Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I want to compare two columns on the same table.
If the Columns match it should return 3.
If thet dont match return 2.
If both are blank return 1.
I want to use these values in conditional formatting. 1 for red, 2 for yellow and 3 for green.
I have tried this, but it wont return 1. Only returns 2 and 3.
Solved! Go to Solution.
@SnymanGrobler
Try
Match =
SWITCH (
TRUE (),
Table[Column1] = BLANK ( ) && Table[Column2] = BLANK ( ), 1,
Table[Column1] = Table[Column2], 3,
2
)
or
Match =
SWITCH (
TRUE (),
Table[Column1] & Table[Column2] = "", 1,
Table[Column1] = Table[Column2], 3,
2
)
Hi @SnymanGrobler
Please try
Match =
SWITCH (
TRUE (),
ISBLANK ( Table[Column1] ) && ISBLANK ( Table[Column2] ), 1,
Table[Column1] = Table[Column2], 3,
2
)
Hi, @tamerj1
This does not work.
My conditional formatting looks as follows:
With this logic it still only returns green and yellow colors. Example:
Do you have any idea why this is the case?
Thanks
@SnymanGrobler
Try
Match =
SWITCH (
TRUE (),
Table[Column1] = BLANK ( ) && Table[Column2] = BLANK ( ), 1,
Table[Column1] = Table[Column2], 3,
2
)
or
Match =
SWITCH (
TRUE (),
Table[Column1] & Table[Column2] = "", 1,
Table[Column1] = Table[Column2], 3,
2
)
Thank you very much, second solution worked.
Match = IF(ISBLANK(Table[Column1]) && ISBLANK(Table[Column2]), 1,
IF(Table[Column1] = Table[Column2], 3, 2)
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
18 | |
15 | |
12 | |
11 | |
8 |
User | Count |
---|---|
24 | |
18 | |
12 | |
11 | |
10 |