Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi all, I am really stuck trying to create 1 slicer that can filter the 'Lag1' and 'Lag2' columns for a matrix visual.
Basically, the slicer should have only 2 options - 1) Lag1 and 2) Lag2. When the user clicks on "Lag1" for example, only rows that are labelled "Lag1" should be filtered. I cannot concat the 2 columns as there are overlaps, some Lag1s are also Lag2s. Can I ask if this is possible? Or how else should I go about making this slicer?
Solved! Go to Solution.
Hi @Anonymous ,
Since your data is simple, just create the following seperate table
Then create a measure
Lag = SWITCH(SELECTEDVALUE('Table (2)'[Category]),"Lag1","Lag1","Lag2","Lag2")
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Since your data is simple, just create the following seperate table
Then create a measure
Lag = SWITCH(SELECTEDVALUE('Table (2)'[Category]),"Lag1","Lag1","Lag2","Lag2")
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hello @v-stephen-msft although this post has been a while, but I think it is very useful and would like to know this same method could also apply to the headers where contains the same string. like lag1-a, lag1-b, lag1-c; lag2-a,lag2-b, lag2-c? Thanks in advance.
@Anonymous , You need to create independent table
leg =
Distinct(union(
summarize(Table, [Leg1], "Name", "Leg1"),
summarize(Table, [Leg2], "Name", "Leg2")
))
You can use this as an independent filter
example measure
Switch( selectedvalues(leg[Name]) , //Name is leg1
"Leg1" , calculate(countrows(Table), filter(Table[leg1] in values(Leg[Leg1]))),
"Leg2" , calculate(countrows(Table), filter(Table[leg2] in values(Leg[Leg1]))) //name leg 1 in new table
)
@Anonymous , slicer or filter should come from leg table.
measure you should in filter as value
User | Count |
---|---|
125 | |
108 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |