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 All
I need to compute the different of below 2 expression :-
Solved! Go to Solution.
@Anonymous
Have you tried creating a new measure with the following calculation
Measure = [ROLL_24_SALES] - [ROLL_12_SALES]
Or another option is the following:
Difference =
var _ROLL_12_SALES = CALCULATE(sum(SALES[sales]),DATESINPERIOD('Date'[Date],MAX(SALES[date]),-12,MONTH))
var _ROLL_24_SALES = CALCULATE(SUM(SALES[sales]), DATESINPERIOD('Date'[Date], maxx('Date', DATEADD('Date'[Date],-12,MONTH)),-12, MONTH))
Return
_ROLL_24_SALES - _ROLL_12_SALES
@Anonymous
Have you tried creating a new measure with the following calculation
Measure = [ROLL_24_SALES] - [ROLL_12_SALES]
Or another option is the following:
Difference =
var _ROLL_12_SALES = CALCULATE(sum(SALES[sales]),DATESINPERIOD('Date'[Date],MAX(SALES[date]),-12,MONTH))
var _ROLL_24_SALES = CALCULATE(SUM(SALES[sales]), DATESINPERIOD('Date'[Date], maxx('Date', DATEADD('Date'[Date],-12,MONTH)),-12, MONTH))
Return
_ROLL_24_SALES - _ROLL_12_SALES
Hi Themistoklis
Thank you very much for your sharing , it work fine now.
Paul
@Anonymous
ROLL_24_SALES is not correct! you have 2 time intelligence formulas in a same measure!
What do you to do?
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 36 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 74 | |
| 66 | |
| 65 |