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.
Hello,
I need to have a slicer with options : X and Y.
I have a table like this :
Name | Transport | Network |
A | Toto | 1 |
B | Tata | 1 |
C | Toto | 3 |
X : if transport = Toto
Y : if Network = 1
But, if I use IF loop I have this :
Name | Transport | Network | Slicer |
A | Toto | 1 | X,Y |
B | Tata | 1 | Y |
C | Toto | 3 | X |
So, I can't use that in slicer. I would like only two choices and for A crossjoin in order to display A,B or B,C according to my filter.
Do you have any idea to do that ?
Thanks in advance
Solved! Go to Solution.
Hi @PBIMorgan01 ,
Please try the way below.
Firstly unpivot Transport and Network columns in Query Editor.
Then create the calculated column like below.
Column = IF('Table'[Value]="Toto","X",IF('Table'[Value]="1","Y"))
Then you could use column as a slicer.
Best Regards,
Cherry
Hi @PBIMorgan01 ,
Have you solved the problem?
If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please feel free to ask.
Best Regards,
Cherry
Hi @PBIMorgan01 ,
Have you solved the problem?
If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please feel free to ask.
Best Regards,
Cherry
Hi @PBIMorgan01 ,
Please try the way below.
Firstly unpivot Transport and Network columns in Query Editor.
Then create the calculated column like below.
Column = IF('Table'[Value]="Toto","X",IF('Table'[Value]="1","Y"))
Then you could use column as a slicer.
Best Regards,
Cherry
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 |
---|---|
75 | |
69 | |
55 | |
38 | |
35 |
User | Count |
---|---|
87 | |
69 | |
59 | |
46 | |
46 |