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 all, I'm trying to figure out how to make a measure that can give the value of the last date minus (-) the value of the second last date from each separate Id in a column. So, on any given day I should be able to tell from each item in a coumn what the change was from the last recorded date. Basically I'm after the variance.
Would love to hear any ideas!
Solved! Go to Solution.
Create 2 calculated columns,
Latest date = Calculate( MAX([Date]), [ID]=EARLIER([ID] )
Latest date -1 = Calculate( MAX([Date]), [ID]=EARLIER([ID], [Date] <> [Latest Date] )
Should give you the 2 dates you are looking for, then you can simply use them in a measure calculation,
Latest date amount = Calculate( Sum([amount]) , [Date] = selectedvalue([Latest date])
Latest date -1 amount = Calculate( Sum([amount]) , [Date] = selectedvalue([Latest date -1])
and finally
Difference = [Latest date amount] - [Latest date amount]
Create 2 calculated columns,
Latest date = Calculate( MAX([Date]), [ID]=EARLIER([ID] )
Latest date -1 = Calculate( MAX([Date]), [ID]=EARLIER([ID], [Date] <> [Latest Date] )
Should give you the 2 dates you are looking for, then you can simply use them in a measure calculation,
Latest date amount = Calculate( Sum([amount]) , [Date] = selectedvalue([Latest date])
Latest date -1 amount = Calculate( Sum([amount]) , [Date] = selectedvalue([Latest date -1])
and finally
Difference = [Latest date amount] - [Latest date amount]
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 |
---|---|
114 | |
100 | |
81 | |
70 | |
62 |
User | Count |
---|---|
148 | |
116 | |
104 | |
90 | |
65 |