Forum Discussion

MJG2112's avatar
MJG2112
Advocate II
8 months ago
Solved

Problem with Cell Elements Formatting

Hi. I'm not getting the desired results with Cell Elements formatting.  My scenario is this:   I have two tables A & B.  They have a Many:Many relationship, but with the correct application of filt...
  • v-hashadapu's avatar
    v-hashadapu
    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.