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 Team,
Can someone help me with a measure that will show as Result in below table please?
The condition is, if Group 2 contains X, then the Result = Red be applied to the whole row based on Group 1, else Result = Green.
Any help is much appreciated! Thank you!.
Group 1 | Group 2 | Result |
Malaysia | 1 | Green |
Malaysia | 1 | Green |
Malaysia | 1 | Green |
Singapore | 1 | Red |
Singapore | X | Red |
Singapore | 1 | Red |
Singapore | X | Red |
Thailand | 1 | Red |
Thailand | X | Red |
Thailand | 1 | Red |
Solved! Go to Solution.
Hello @Mimi_Ibrahim,
Can you please try this:
Result Measure =
VAR CurrentGroup1 = MAX('Table'[Group 1])
VAR IsXInGroup = CALCULATE(
CONTAINS('Table', 'Table'[Group 2], "X"),
ALL('Table'),
'Table'[Group 1] = CurrentGroup1
)
RETURN
IF(IsXInGroup, "Red", "Green")
Hello @Mimi_Ibrahim,
Can you please try this:
Result Measure =
VAR CurrentGroup1 = MAX('Table'[Group 1])
VAR IsXInGroup = CALCULATE(
CONTAINS('Table', 'Table'[Group 2], "X"),
ALL('Table'),
'Table'[Group 1] = CurrentGroup1
)
RETURN
IF(IsXInGroup, "Red", "Green")
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 | |
13 | |
11 | |
7 |
User | Count |
---|---|
25 | |
22 | |
12 | |
11 | |
10 |