Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi Everyone,
I have an aggregate measure accumulating the sales as the months go on called "Actual TRG AGG"
I've highlighted above the portion relating to the Aggregating element but when I try to create the same measure for the year before:
You can see that I'm not able to maintain the aggregating element.. how do I keep the aggregation in the -1 measure?
Thanks,
Eyal
Solved! Go to Solution.
@Anonymous , In the that max filter for cumulative you should use date table
filter(allselected('Date'),'Date'[date] <=max('Date'[date])
and for one year use the same calculation with
var _max = max('Date'[date])
var _date = date(year(_max), month(_max), day(_max) )
return
calculate([Actual TRG], filter(allselected('Date'),'Date'[date] <=_date ) , <Rest of the calc> )
@amitchandak is there a way to make this instead of sameperiodlastyear, to have it reference to last month?
These are my filters in case I wasn't clear @amitchandak . And yes I switch from sales dates to calendar dates table.
Thanks @amitchandak and tried it --> see '-1v2' below:
It gives the same as the original year. I need it to add(aggregate) so for February it would be the sum of the highlighted (371+408=779)
@Anonymous , In the that max filter for cumulative you should use date table
filter(allselected('Date'),'Date'[date] <=max('Date'[date])
and for one year use the same calculation with
var _max = max('Date'[date])
var _date = date(year(_max), month(_max), day(_max) )
return
calculate([Actual TRG], filter(allselected('Date'),'Date'[date] <=_date ) , <Rest of the calc> )
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |