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
I'm trying to create a sum measure but but at a prior year time frame.
Here are my measures I'm using.
Basic summation
sumMeasure = SUM(t1[measure])
I need to use this formula because I want to sum my sumMeasure, but not have it affected by the Baseline Date. This Date is used to control other measuers
currentSum = SUMX(ALL(__BaseDateTable[Baseline Date]),[sumMeasure])
I thought I would then be able to just follow with this one below to get the previous date
CALCULATE(SUM(currentSum, PREVIOUSYEAR('Time'[DateKey]))
but the sum fuction does not take the currentSum as an argument and wants a column, not a measure.
Is there an alternative way to do this, keeping my currentSum formula?
HI @user9394,
Perhaps you can try to use date function to manually define the filter range instead of time intelligence functions:
ime Intelligence "The Hard Way" (TITHW)
Regards,
Xiaoxin Sheng
Hi,
Create a relationship (Many to One and Single) from the _Baseline Date column of the _BaseDataTable to the Date column of the Calendar Table. Drag Year from the Time table and select a Year there. Write this measure
Measre for PY = calculate([measure],previousyear('time'[Date]))
Hope this helps.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |