Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi All,
Below is my data. I need to filter the values based on the slicer selection
| exp | 2017 | 2021 |
| 0 | 4 | 4 |
| 0 | 0 | 0 |
| -99999 | 6 | 6 |
| -99999 | 7 | 0 |
| 2 | 8 | -99999 |
| 4 | 9 | 9 |
| 7 | 5 | -99999 |
| 7 | 0 | 0 |
| 0 | 0 | 0 |
| 1 | 1 | |
| -99999 | 0 | 0 |
| -99999 | -99999 | 1 |
| 0 | 0 | 0 |
| 8 | -99999 | -99999 |
| 8 | 1 | 1 |
| 9 | -99999 | -99999 |
When I select any value in the slicer I need only those values in the columns I dont need any other values and slicer needs to work independent filtering of columns. For example If I select '-99999' I need below output.
| Output | ||
| exp | 2017 | 2021 |
| -99999 | -99999 | -99999 |
| -99999 | -99999 | -99999 |
| -99999 | -99999 | -99999 |
| -99999 | -99999 |
When I select 0 in the slicer then the output I need like below.
| exp | 2017 | 2021 |
| 0 | 0 | 0 |
| 0 | 0 | 0 |
| 0 | 0 | 0 |
| 0 | 0 | 0 |
| 0 | 0 | |
| 0 |
Can anybody let me know how I can achive this by using DAX. If you have any idea to achieve please help on this.
Thank for your time.
please use SWITCH in DAX
Can you please explain in detail or give example when I tried it gives result like below. I need the above output.
| exp | 2017 | 2021 |
| -99999 | 6 | 6 |
| -99999 | 7 | 0 |
| -99999 | 0 | 0 |
| -99999 | -99999 | 1 |
| 2 | 8 | -99999 |
| 7 | 5 | -99999 |
| 8 | -99999 | -99999 |
| 9 | -99999 | -99999 |
Hi @SriBhaskar
The result you want would destroy the relationship between the rows of the original table, so it is not possible.
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Fabric update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!