Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
User | Count |
---|---|
130 | |
108 | |
101 | |
67 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |