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,
Wonder if you might be able to help me out with something please? I am trying to show the change in a period defined by a slicer and want to grab the value at the start and end of the date range defined by the slicer.
Date | Value |
01/01/2020 | 11 |
02/01/2020 | 54 |
03/01/2020 | 7 |
04/01/2020 | 23 |
05/01/2020 | 36 |
My data would look something like the above, my slicer slices on Date and if I selected 03/01/2020 to 05/01/2020 on my slicer I would want a measure to return 7 and one to return 36 so I can calculate the change between the start and end of the range.
I hope all of that makes sense, and thank you in advance for any help you can offer.
Mark
@Anonymous ,
Try like. Change position of _min and _max in formula as per need
Measure =
var _min = minx('Date','Date'[Date])
var _max = maxx('Date','Date'[Date])
return
calculate(Table[Value],filter('Date','Date'[Date]=_min))- calculate(Table[Value],filter('Date','Date'[Date]=_max))
Measure =
var _min = minx('Date','Date'[Date])
var _max = maxx('Date','Date'[Date])
return
calculate(Table[Value],filter(all('Date'),'Date'[Date]=_min))- calculate(Table[Value],filter(all('Date'),'Date'[Date]=_max))
Fantastic, I will give it a whirl and see what happens.
In the meantime I think I have made it work with this:
Min Report Date = LOOKUPVALUE('Activity Tracking'[Units],'Activity Tracking'[Report Date],MIN('Count_Report'[Report Date]))
With same measure again for Max
and when I filter the dates with the slider the measures seem to show the correct values.
Does my soluution seem OK? (I have >500 rows of data so performance not too much of a concern)
Hi @Anonymous
in your solution could be issues with filtering as it doesn't support row context.
If you sure your user scenarios doesn't affect to result, LOOKUPVALUE() is also ok
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 |
---|---|
113 | |
99 | |
80 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |