Forum Discussion
Problem with Cell Elements Formatting
- 8 months ago
Hi MJG2112 , Thank you for reaching out to the Microsoft Community Forum.
Make sure the table visual includes a unique A key so the measure can evaluate per row. Then add this test measure to the visual, you should see 1 or 0 for each A row:
HasBFlag =
IF( CALCULATE( COUNTROWS( TableB ) ) > 0, 1, 0 )
Apply conditional formatting. Conditional formatting -> Icons (or Background) -> Format style = Rules -> What field should we base this on? = HasBFlag -> Summarization = First. Create two rules: 1 => green icon, 0 => red icon. Don’t return BLANK(), use 0 for missing-B. If A->B filtering is unreliable, use the explicit key variant that matches A’s key to B’s key.
If the test measure still shows the same value for every row, paste the exact DAX you used and a screenshot of the table with the test measure visible and anything you may feel relevant to the issue.
Hi MJG2112 , hope you are doing great. May we know if your issue is solved or if you are still experiencing difficulties. Please share the details as it will help the community, especially others with similar issues.
- MJG21128 months agoAdvocate II
Hi v-hashadapu, I still can't get this to work. Using a measure only returns the same state for every row in table (so every row has the same icon), except the rows with nothing in in table B, which remain blank.
- v-hashadapu8 months agoCommunity Support
Hi MJG2112 , Thank you for reaching out to the Microsoft Community Forum.
Make sure the table visual includes a unique A key so the measure can evaluate per row. Then add this test measure to the visual, you should see 1 or 0 for each A row:
HasBFlag =
IF( CALCULATE( COUNTROWS( TableB ) ) > 0, 1, 0 )
Apply conditional formatting. Conditional formatting -> Icons (or Background) -> Format style = Rules -> What field should we base this on? = HasBFlag -> Summarization = First. Create two rules: 1 => green icon, 0 => red icon. Don’t return BLANK(), use 0 for missing-B. If A->B filtering is unreliable, use the explicit key variant that matches A’s key to B’s key.
If the test measure still shows the same value for every row, paste the exact DAX you used and a screenshot of the table with the test measure visible and anything you may feel relevant to the issue.