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
again another simple question but maybe im over thinking it.
I'm wanting to calculate the SUM('Table'[Sales]) (At a given time) for the previous year at a given quarter,
I guess my confusion is what if we are not using dates in the visualization itself how could i do this?
I have created a measure:
= Calculate(
Sum('Table'[Sales]),
DateAdd('Table'[Date], -1, YEAR),
'Table'[Quarter] = "Q4"
)
when inserting into the visual it just returns all sales (im assuming because there is no context specifying the date)
So my thought is to maybe include TODAY() but then what if a year on a slicer how would it then work?
Time intelligence helps shifting calculation period. With this code, to show the Q4 of the previous year, you need somewhere in your visual with the context of Q4 of this year.
= Calculate(
Sum('Table'[Sales]),
DateAdd('Table'[Date], -1, YEAR)
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 14 | |
| 7 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 25 | |
| 10 | |
| 10 | |
| 6 | |
| 6 |