Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have replaced a measure:
CALCULATE ([GM % YTD], SAMEPERIODLASTYEAR('Date'[Date]))
With measure:
VAR VAR1 = ADDCOLUMNS( VALUES(Revenue[Key_Client]),
"Col1", CALCULATE([GM % YTD], SAMEPERIODLASTYEAR('Date'[Date]),
REMOVEFILTERS(Revenue[Type],Revenue[SectorType]))
)
RETURN AVERAGEX(VAR1, [Col1])
Both measures point to GM % YTD, which is:
CALCULATE([GM %]
,DATESYTD('Date'[Date],"31/05"))
I see some problems when I display them side by side:
I am unable to find how/where is the aggregation used... 73,2% doesn't seem to be average
Also… how can I force the measure on the right to do the same aggregation?
Solved! Go to Solution.
@ovonel , if you need last year YTD try like
CALCULATE([GM %]
,DATESYTD(dateadd('Date'[Date],-1,Year),"31/05"))
Make sure date table is marked as date table
Why Time Intelligence Fails - Power bi 5 Savior Steps for TI: https://youtu.be/OBf0rjpp5Hw
@ovonel , if you need last year YTD try like
CALCULATE([GM %]
,DATESYTD(dateadd('Date'[Date],-1,Year),"31/05"))
Make sure date table is marked as date table
Why Time Intelligence Fails - Power bi 5 Savior Steps for TI: https://youtu.be/OBf0rjpp5Hw
User | Count |
---|---|
97 | |
87 | |
77 | |
67 | |
63 |
User | Count |
---|---|
112 | |
96 | |
95 | |
67 | |
65 |