Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello
SWITCH formula is supposed to simplify nested IFs, but can we set a value for when the value of the field does not match what we specify?
e.g.
The below inserts A or B if 1 or 2 respectively, but can we set it to insert "NA" for values other than 1 or 2?
SWITCH(Rules[Index],
1, "A",
2, "B"
)
Thanks
Solved! Go to Solution.
@UsePowerBI , you can use switch true
example
Ind = Switch( True()
RIGHT('Weekly Data'[Pmt_Instruction_Cde],1)="2" && 'Weekly Data'[Days from Report Date] >=0 && 'Weekly Data'[Days from Report Date] <31,"All States Overdue",
RIGHT('Weekly Data'[Pmt_Instruction_Cde],1)="2" && 'Weekly Data'[State]="CA" && 'Weekly Data'[Days from Report Date] >=90,"CA Overdue",
RIGHT('Weekly Data'[Pmt_Instruction_Cde],1)="2" && 'Weekly Data'[State]="OR" && 'Weekly Data'[Days from Report Date] >=60,"OR Overdue",
""
)
You can any number of conditions
User | Count |
---|---|
94 | |
86 | |
78 | |
70 | |
63 |
User | Count |
---|---|
114 | |
101 | |
97 | |
66 | |
59 |