Forum Discussion
PBI Filter times What If Parameter - Possible?
- 5 years ago
swinings wrote:
Total Amount/New Measure = (chosen rate/filter) * ((Number of Days/Weeks/Months * Number of Units Per Day/Week/Month) * Number of People Receiving Service)
I'm looking for the first part of the DAX code (the chosen rate/filtered info).
If I understand your issue correctly you should be able to do this using the SELECTEDVALUE() function.
Something like SELECTEDVALUE( '<your table>'[Rate] ) would give you the current filter selection for the [Rate] column. You can also optionally specify a default value if nothing is selected, but if you don't do this it just returns BLANK()
swinings
You create a distinct table for the rate column as the new slicer, it must be disconnect to the main table.
Slicer rate = Distinct(Table[rate])
Then use selectedvalue() to call out the filtered rate.
Measure = Selectedvalue(Slicer Table[rate]) * ((Number of Days/Weeks/Months * Number of Units Per Day/Week/Month) * Number of People Receiving Service)
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.