Forum Discussion
Clustered column average total
This is one of those cases where you will have to write some DAX.
Using the CALCULATE() function in DAX you can modify the filter context.
So if you have a row showing data for a specific month you can CALUCLATE() the average for the 3 previous months, because CALCULATE allows you to use the ALL() function to temporarily remove the filter context for that row and reset it to consider the whole table, which you can then filter to get the 3 month average.
If you'd like some help writing the DAX post a small sample power bi file, or an excel file with a sample of your data.
I'm a personal Power Bi Trainer I learn something every time I answer a question
The Golden Rules for Power BI
- Use a Calendar table. A custom Date tables is preferable to using the automatic date/time handling capabilities of Power BI. https://www.youtube.com/watch?v=FxiAYGbCfAQ
- Build your data model as a Star Schema. Creating a star schema in Power BI is the best practice to improve performance and more importantly, to ensure accurate results! https://www.youtube.com/watch?v=1Kilya6aUQw
- Use a small set up sample data when developing. When building your measures and calculated columns always use a small amount of sample data so that it will be easier to confirm that you are getting the right numbers.
- Store all your intermediate calculations in VARs when you’re writing measures. You can return these intermediate VARs instead of your final result to check on your steps along the way.
I created a sample pbix file but it won't let me drag and drop or copy-paste it here. how do I post it?
- kentyler6 years agoSolution Sage
share via one drive ? google drive ?
- Anonymous6 years agoNot applicable
- kentyler6 years agoSolution Sage
this is the chart in the sample
It looks like this is totaling all the data in the table
are you saying, you would like to get these counts for a specific month's worth of data, and compare it with the total for the previous 3 months ?