Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have the below sample of data and I would like to create a measure which will allow me to retrieve the value of the previous month when selecting a certain month in a slicer. For instance, when selecting Apr-2018 to display 54, when selecting Dec-2019 to display 64.
Thank you!
Month | Index | Value |
Jan-2018 | 1 | 54 |
Apr-2018 | 2 | 867 |
June-2019 | 3 | 64 |
Dec-2019 | 4 | 32 |
Solved! Go to Solution.
Hi @Anonymous
Try this measure or the attached file for detail.
Previous Value 2 =
VAR __index = SELECTEDVALUE( 'Table'[Index] ) -1
RETURN
CALCULATE(
SUM( 'Table'[Value] ),
ALL( 'Table' ),
'Table'[Index] = __index
)
Hi @Anonymous
Try this measure or the attached file for detail.
Previous Value 2 =
VAR __index = SELECTEDVALUE( 'Table'[Index] ) -1
RETURN
CALCULATE(
SUM( 'Table'[Value] ),
ALL( 'Table' ),
'Table'[Index] = __index
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |