Forum Discussion
Rolling average for categories.
I have data in form of three columns (Date, Incidents and Department). I want to calculate a rolling average measure for a chart which has departments in rows, incident sum for each month and finally a rolling 6 month average value for that department.
I have tried solution given on https://www.youtube.com/watch?v=ACvYaXnpyCM. It breaks when i try to add department to the rows instead of month names.
6 Replies
- johnt75
Super User
If I understand correctly you want a visual which has departments on the rows and shows the average incidents over the last 6 months. Using the method from the video you can add a visual filter to the table so that the date is in the current month. that will then work out the average over the last 6 months.
- Nimesh2kotadiaRegular Visitor
i want to display data in the following format -
Department - April - March - February - January - 6M rolling aerage.
When i use the already created measure in the above scenario, it produces one extra column for each month. Even values are not correctly calculated. Can you please help me understand why the measure fails.
- johnt75
Super User
Do you have a date table or is it all coming from one table? If its all in one table then you'll need to create a proper date table. Plenty of articles and videos about that.
- Nimesh2kotadiaRegular Visitor
It was all coming from a single table. But i can create a date table. How to proceed after creating the date table?