Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
Currenly Im available just to make a comparison between CY and PY:
This works great, but the new requierement is selecting the both years I want to compare.
Solved! Go to Solution.
I would set up 2 new tables for use on the slicers,
First Year = ALLNOBLANKROW('Date'[Year])
Second Year = ALLNOBLANKROW('Date'[Year])
Do not connect these tables to anything in the model. The create 2 measures as
Value for first year = CALCULATE( [Spend Amount Original], TREATAS( 'First Year'[Year], 'Date'[Year]) )
Value for second year = CALCULATE( [Spend Amount Original], TREATAS( 'Second Year'[Year], 'Date'[Year]) )
I would set up 2 new tables for use on the slicers,
First Year = ALLNOBLANKROW('Date'[Year])
Second Year = ALLNOBLANKROW('Date'[Year])
Do not connect these tables to anything in the model. The create 2 measures as
Value for first year = CALCULATE( [Spend Amount Original], TREATAS( 'First Year'[Year], 'Date'[Year]) )
Value for second year = CALCULATE( [Spend Amount Original], TREATAS( 'Second Year'[Year], 'Date'[Year]) )
@tsynenkyy , Try like
Spend Selection PY = CALCULATE([Spend Amount Original],dateadd('DIM_TIME'[Date],-1,Year))
or
Spend Selection PY = CALCULATE([Spend Amount Original],SAMEPERIODLASTYEAR('DIM_TIME'[Date]))
User | Count |
---|---|
86 | |
82 | |
68 | |
65 | |
55 |
User | Count |
---|---|
123 | |
100 | |
90 | |
83 | |
66 |