I have a starting date, and an end date in tableau, is there a way to create a calculated field with all date (months) ranging from my start date to my end date?
If you're just looking for a visual solution, if you place a Month(date) discrete dimension in your columns bar, right click on it and click on 'Show missing values'. That would force nulls to show, e.g.
Although what you have specifically asked for sounds like you're looking to do 'data densification' or 'data padding'. You'd have to think about how that generated data would relate to the existing data.
It might also be easier to create a static file with the month/year in columns and (left) join that to the data set you are using. Then you have something you can reuse. I'd recommend that approach.
Related
When I exclude the first column (2017) the data in the second which is now first (2018) goes missing as well.
It looks like you are using a Table Calculation of Percent Difference From If this is the case, the first column will always be blank when set to Table (across).
This is a case where you want to hide the first column, not exclude it. That way Tableau includes the first year in its query and calculations, so that it can then compute the percentage differences client-side in a table calc.
Just right-click on the first column header, and choose hide. The data will be there behind the scenes to support the calculations, but not displayed.
Okay. This is a little bit complicated for me to explain and I am not even sure there is a way to do this using SSMS or MS Excel. Let's start...
I would like to do data analysis for a family-owned company. We use ERP system which has the option to export some sales reports. I would like to see our sales from last year for a specific item and sales representers and other analysis. However, I have a column and right below that column, there is another column which has different information and data type. I attached an example which describes the situation better than me.
Job# column overlaps with Item Price (which shows as NULL), date column overlaps with service price and job type column overlaps with total price column for every job.
Date column shows 43525 instead of March 1, 2018 and if I try to change this to date column then it affects the service price column. Although, it doesn't let me to change it.
It would be nice if I can separate those columns which overlapenter image description here one another. Any suggestion would work. Is there a way to do it dynamically using SSMS or Excel?
Thanks in advance for your time!
enter image description here
I’m relatively new to Qlikview and have a dataset that shows metrics by date.
This data spans two years and the requirement is to have a comparison/variance that is dynamic and can handle the date filters on the report.
For example if the user selects 2018 this field should show the current date compared to the previous year date. Similar for Quarters, months, weeks and weekdays.
Ideally it should always show for the previous period. They’ve had this created in Excel but it can’t handle the amount of records and I suggested QlikView as I had created some other Dashboards in it.
I have tried set analysis though I struggle to see how that would fit into one expression.
Any thoughts would be appreciated!
I would say you would need two expressions, one without a set analysis (that would be filtered by your current selection) and one with a set analysis to guarantee that you only get today's value. This would be something like :
Sum($<[Date Field] = {"$(=Date(Today(), 'DD/MM/YYYY'))}>} [Value Field])
Check the date format conversion to see if it matches the date format of your field.
I am having issues trying to create code to make a graph that is dependent upon months. So I have Column A which is the beginning of the week date, i.e. 1/1/17. In Column B I have the count from that week of issues occurred. I would like to group together the count by month, using the Month function, so for January there are 37 issues, February - 23, etc. And then make a graph accordingly where the first month is titled January.
Eventually, I would like to similarly do this on a quarterly basis as well, but any help with the monthly issue first would be greatly appreciated. Here is a screenshot of the data which is located in Worksheets("Report").
First off, format your data as a table since that will make your life much easier. You will need to add headers to each column. This will make your data easier to read, and easier to maintain.
To format it as a table highlight the range, and then press CTRL+T. Make sure to check 'My data has headers'.
Good, now click inside the table, Insert > PivotTable. Select the destination. For rows you want Date, for values you want Sum of Value (where value is whatever you name your values column.
Then finally, check out this article for the whole rundown of Groupby: http://www.contextures.com/xlPivot07.html.
To be fair, there is an easy enough way of doing this without a PivotTable (adding a helper column for Month for example), but there's no need to reinvent the wheel. Additionally, if you want to add Qtr. eventually, you're better off familiarizing yourself with workhorses of excel.
Lastly, once you have taken the above steps, you'll likely find the Timeline slicer very helpful. You can use that to visualize specific periods on your pivot or chart.
Minor Note: This all assumes your dates are true dates. If they aren't, you'll likely run into more issues.
In my Access database, I have a table called customers. In this table I have a column called DateEntered. The data type for the field is short text.
The values in this column are not coherent - they come in several variations:
MM-DD-YYYY,
MMDDYYYY and
MM/DD/YYYY.
There doesn't seem to be any standard set.
My goal is to select all customers from 2012. I tried
select *
from customers
where DateEntered <('%2013') AND >('%2012');
but it comes up blank when I run it.
Can anyone point out what I'm failing to do correctly & more importantly explain why exactly this query doesn't work in Access? From my understanding of SQL (not very advanced) this should work.
Another variant)
select * from customers where RIGHT(DateEntered, 4) = '2012'
If you have control over the database and application code, the best way to handle this is to use an actual Date field instead of text in the table.
One way to handle this would be to add a new field to the table, write a query or two to correctly convert the text values to actual date values, and populate the new field.
At this point, you would then need to hunt down the application code the refers to this field in any way and adjust to treat the field as a date, not text. This includes your insert and update statements, report code, etc.
Finally, as a last step, I would rename the original text field (or remove it altogether) and rename the new date field to the original field name.
Once you fix the problem, querying against the field will be a piece of cake.
Alternatively, if you can't alter the table and source code, you can use the date conversion function CDATE() to convert the text value to an actual date. Note that you may need to guard against non-date entries (NULL or empty string values, as well as other text values that aren't really dates in the first place). The IsDate() function can be your friend here.
If you have the time and patience, fixing the data and code is the better approach to take, but sometimes this isn't always feasible.
Why don't you use LIKE operators (they're appropriate when you have a pattern using % and _):
select * from customers where DateEntered like '%2013' or DateEntered like '%2012'