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,
I have one I am struggling to even explain so I hope this little diagram might help.
There is data that I want to be able to filter with a slicer but some of it is in more than one filter type, I cannot think of a way to do this, any ideas?
Made up data:
Column1 - Column2
134324 - Type 1
324234 - Type 1
545345 - Type 3
435345 - Type 2
353454 - Type 3
435344 - Type 3
453453 - Type 2
345324 - Type 1
The the "filters" or slicer
Filter 1 = Show only Type 1
Filter 2 = Show both Type 2 AND Type 3
Filter 3 = Show only Type 3
It is this second Filter 2 where I am struggling with.
Solved! Go to Solution.
Hi @Anonymous ,
You can create a new table to put the slicer.
Then create a measure.
New Column =
SWITCH (
SELECTEDVALUE ( 'Table (2)'[Slicer] ),
"Filter 1 = Show only Type 1", CALCULATE ( SUM ( 'Table'[Column1] ), FILTER ( 'Table', [Column2] = "Type 1" ) ),
"Filter 2 = Show both Type 2 AND Type 3",
CALCULATE (
SUM ( 'Table'[Column1] ),
FILTER ( 'Table', [Column2] = "Type 2" || [Column2] = "Type 3" )
),
"Filter 3 = Show only Type 3", CALCULATE ( SUM ( 'Table'[Column1] ), FILTER ( 'Table', [Column2] = "Type 3" ) )
)
The result is as follows.
You can check more details from here.
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 ,
You can create a new table to put the slicer.
Then create a measure.
New Column =
SWITCH (
SELECTEDVALUE ( 'Table (2)'[Slicer] ),
"Filter 1 = Show only Type 1", CALCULATE ( SUM ( 'Table'[Column1] ), FILTER ( 'Table', [Column2] = "Type 1" ) ),
"Filter 2 = Show both Type 2 AND Type 3",
CALCULATE (
SUM ( 'Table'[Column1] ),
FILTER ( 'Table', [Column2] = "Type 2" || [Column2] = "Type 3" )
),
"Filter 3 = Show only Type 3", CALCULATE ( SUM ( 'Table'[Column1] ), FILTER ( 'Table', [Column2] = "Type 3" ) )
)
The result is as follows.
You can check more details from here.
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.
That is perfect! Thank you very much 🙂
I am sorry for the very long delay in marking as the solution, I got side tracked.
Thanks again, this is very much appreciated.
@Anonymous not sure what you mean show type 2 and type3? do you want these options to show in the slicer/filter? What you are trying to do?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi,
Yes it is a bit tricky to explain 😞
I need the slice to be able to like show an OR condition I guess. Show if the match is one OR another.
Is this possible?
If an option is selected then filter for type 1 or type 2.
Any ideas? I am still no closer to an idea how this would work.
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 |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |