Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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 |
---|---|
94 | |
84 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |