Forum Discussion
Filter table (Multiple Condition) using SELECTEDVALUE from slicer - Please Help!
Hi,
Need help in filtering table using SELECTEDVALUE from slicer.
"data" contains all information
Intention is to filter the information from data using the selected value from the slicer
The filter looks like this
When I ran that in DAX, nothing is returned
I tried replacing "SELECTEDVALUE(selected[Year])" with a value like "2010" , the code looks like this
and after running that I see results.
SELECTEDVALUE(selected[Year]) is working when I checked using the datacard
Really appreciate your help! Have been stuck on this problem for the past few days
Anonymous , Try like
Measure = var _Table = FILTER(data,data[First Yr of Service]<=SELECTEDVALUE(selected[Year]) && (data[Last Yr of Service]>SELECTEDVALUE(selected[Year]) || data[Last Yr of Service] = blank())) return sumx(_table,[Column])
10 Replies
- amitchandakSuper User
Anonymous , You can not use the slicer value in table creation.
- AnonymousNot applicable
Thanks for your speedy reply. Can you advise what I can do as an alternative?
- amitchandakSuper User
Anonymous , There is not alternate you can have this table in measure and use
Measure
var _Table =
FILTER(data,data[First Yr of Service]<=SELECTEDVALUE(selected[Year]) && (data[Last Yr of Service]>SELECTEDVALUE(selected[Year]) || data[Last Yr of Service] = blank()))return
sumx(_table,[Column])