Forum Discussion
Aggregate rows on months with DAX
- Anonymous10 years ago
You might check this oldy but goody:
http://www.powerpivotpro.com/2012/01/salesbudget-integrating-data-of-different-grains/
Thanks for your answers.
Since I don't need the costs on a daily base I deleted the relationships of the 'Calendar'[Date] and the Dates in Budget and Actuals.
I replaced it by a Period Table as described in the link from Anonymous.
Now it is very simple to aggregate.
I also tried Anonymous solution, but it didn't realy work for me. I'm just asking me what happens if I need also the aggregation on a Date Level and I have both realtionships. The DateKey and the PeriodKey. Which one will the filter use?
Nevertheless the main problem is solved. My originally formular works with this datamodell now.
I just have an other problem which can be discussed in an other topic. My slizer with the month names of the Period table instead of Calendar table shows blank values again eventhough I used the transform-exclude-blank-transform-back workaround.
Ho do you aggregate Amount month by month?
Suppose Jan 10 , Feb 30, Mar 20, Apr 80, May 25,.... is displayed in my amount field. I want to do trend analysis based on month but at the end of each month the sum should be aggregated. Like Jan 10, Feb 40, Mar 60, Apr 140, May 165,.... How to achevie this logic? Please guide me if any DAX formula is available.