Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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.
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.
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 |
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |