I am trying to create a side-by-side bar chart where one set of bars is a count of open tickets by each week and the other set is the count of closed tickets by each week. The fields are all in a flat table.
For example, if 17 tickets were opened during week 2 (week beginning Sunday, 1/03/2016) and 14 were closed that same week (regardless of when they were created), I'd like to graph those on the same bar chart.
I am using the Week(Opened) function for the dimension of the first set and Week(Closed) as the dimension of the 2nd set. These work fine on separate bar charts. However, there is no common dimension whereby I can put them on the same chart.
I'd like to add a line to the chart as depicted in the 1st screen shot. This line is on a third scale/dimension.
I have tried a Master Calendar but my results are erroneous possibly due to the fact I have two date dimensions.
Sample Bar Chart with line added
Sample data screen capture
You will need to create a canonical date field - the full details can be found here.
https://community.qlik.com/blogs/qlikviewdesignblog/2014/02/17/canonical-date
Essentially you generate a single calendar table from the two date fields and then use the new date generated in your charts.
Related
The dashboard in the linked workbook shows a table with sales split by year on the top. Below, there's a table with the rolling average of the last 4 weeks, including the current. It's set to show NULL if there are not enough data points. I'd like for it to compute the first January 2018 value based on the current week and 3 full weeks from the end of 2017. Carrying that concept forward, all NULLs from 2018 onward will be eliminated. The NULLs for the first 5 weeks of 2017 will be the only NULL values. The average should always be computed on a full 4 weeks (28 days) even when week 53 doesn't contain 7 days.
How can I write a calculation to achieve what's described above?
I've tried putting the WINDOW_AVG function inside a LOD, but that's not allowed. Furthermore, I've also tried using FIXED and even FIXED inside WINDOW_AVG.
Here's one of my attempts:
{FIXED [Week_int]:
WINDOW_AVG(SUM([Sales]), -4, 0)
}
It returns this error: "Error: Level of detail expressions cannot contain table calculations or the ATTR function"
Here's the data structure. It includes one value of Sales per day.
Basically I created a dummy data in Excel by creating dates (from 1-1-2017 to 2-2-2021) and filling some random values (unif dist *5000) against these.
I added Week[date] to columns and year[date] to rows as in your screenshot. I added sum(value) on the text marks card.
Thereafter, I added table calculation --> Moving average --> edited it for previous 4 values , next 0 values, (check current value if you want to include current record), then check Null if there are not enough values. (your requirement). --> click compute using -Specific Dimensions change the order of fields below - drag Year above than week (table across then down will also create the same view)
You should be able to get a view as desired.
Regarding your query on number of days in the week, Tableau caters it automatically if you have chosen it datepart.
Edit I verified this in Excel, the method is correctly working.
See, the average of first 28 values in Excel
and the view built in tableau:
Here's the corrected dashboard hosted on Tableau Public.
Need your help in creating last 12 month avg in tableau put it in a single label
here I tried using window_avg i am able to get the 12 months avg but if i use it label / showing single value for the last month .. it is not working
WINDOW_AVG(SUM([Balance Total]),-11,0)
I am not able to add the sample file so added image .. the expected output is 392306.6 ... or any logic with sample data would be more helpful
Keep your working window avg calc. Create an LAST calculated field.
LAST()
Place it in the filter shelf and set values to zero.
This will hide all other dates in the view but keep the correct window calculation. LAST does not need to be in the view. I only showed it for demo purposes on the screenshot above.
I have a data looks like that
i would like to create a side by side bar chart (will be three bars per each month) one bar to shows the count of orders created during month, the other will be the count of orders dispatched during this month and the third will be count of orders received during this month. the point is that I have to show the values based on the year that the user will choose from a filter.
i can do each measure as one chart but i tried to do it in one side by side bar but i couldn't ... can you please help me
here is the work book
https://community.tableau.com/thread/333776
See this thread create side-by-side bar chart in Tableau
Pivot three fields with dates and it will solve your problem
I have created 2 different column charts in my Power BI report. The charts show the report usage by month and day (Day 1-31) - in this case for October. Only one month can be selected at a time.
I have added a drill-through function to the chart so the user can access a more detailed report. This works fine with the first chart when the Date field is placed under Axis (example: 2017-11-14).
When I instead try to use the Year, Month, Day fields under Axis only the day is being sent through to the drill-through report. For example November 6'th 2017 is being picked up at 6'th of each month. It seems that the drill-though function is only using the lowest level of data.
The first option works fine, however I would like it to look the the chart below where you see the number of each day instead of the entire date.
Any thoughts or suggestions?
Edit:
This is what the drillthrough filters look like on the drillthrough report page (I have selected November 9'th on the other page):
(År = Year, Månad = Month, Dag = Day)
For your second option to work, you need to add Year/Month/Day values to Axis, then on drill-through report page also make sure you add these 3 fields to Drillthrough filters.
But if you only need to show shorter version of days instead of whole date, take a look at the formatting options ==> X-Axis, there you can turn off Concatenate labels and grindlines to get a nicer looking graph like in a picture below.
Main graph:
Drillthrough report:
I finally managed to solve the issue:
I selected the drill down arrow on the right (in the top-left corner of the visualization) to drill down to the lowest level and not the arrow in the middle which I thought did the exact same thing except with more steps.
Now the drillthrough function works and all the values are passed to the next report!
I'm working on Tableau for rainfall data.
I have a cumulative rainfall data for a year (and the months respectively) of different cities.
And I prepared a tableau barchart for the annual rainfall data.
So, if I hover/click my cursor on any of the bar then a line chart which carries the months of that particular city need to be visualized.
Please suggest.
You have to using compulsory Action Filter.
choose dashboard menu -> Action->add action.
Create another worksheet with the line chart month view you would like to see.
Then go to Worksheet>Actions>
Add Action > Filter and Select how you want it to run (hover/select)
Select your new worksheet as the target sheet
Target filters on the year which displays the months you want in the new view
You might need to mess around with these setting to get it how you want exactly but an action is the way to go.