Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello
I have the table:
1, A, E
2, B, F
I want to specify a value, when Column2=A and Column3=E.
Can I do that with SWITCH or do I need IF?
Thanks!
Solved! Go to Solution.
@Anonymous ,
If([column2] ="A" && [column3] ="3",1,0)
switch(true(),
[column2] ="A" && [column3] ="3",1
,0)
For Or Use ||
Hi, @Anonymous
Based on your description, I created data to reproduce your scenario.
Table:
You may create a measure as below to control the display of the visual.
Visual Control =
IF(
SELECTEDVALUE('Table'[Column2])="A"&&
SELECTEDVALUE('Table'[Column3])="E",
1,0
)
Then you need to put the measure in the corresponding visual level filter to get the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous ,
Try the below Code:
Column = IF('Table'[Column1]="A" && 'Table'[Column2]="E","YES","NO")
@Anonymous
I think it works
Column = SWITCH(TRUE(),'Table'[Column1]="A" && 'Table'[Column2]="E","yes")Then I did a test to change a to b, the result is blank.
hope this is helpful.
Proud to be a Super User!
Check out the November 2025 Power BI 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!
| User | Count |
|---|---|
| 97 | |
| 76 | |
| 52 | |
| 51 | |
| 46 |