Forum Discussion

alks_skla_f's avatar
alks_skla_f
Helper II
1 year ago
Solved

Measure breaks visual

Hello,
I have table visual:

I clicked on "Show items with no data" to use left join instead of inner join:

I have a measure:

Every time when I add this measure in table, I just get first duplicated record:

How is it possible, please?

  • Hi alks_skla_f  

    this issue occured because its getting an (Filter Context Conflict).  When you select "Show items with no data"  Power BI tries to show all possible combinations, but here your measure itself has some filter which is causing context conflicts with the visual's row context. 

     

    You can try this dax 

    hst_grdf_TEMP_id_invl_null_and_not_null = 
    SUMX(
        hst_grdf_TEMP,
        IF(
            hst_grdf_TEMP[HST_RESELLER_SALESFORCE_ID_NVL] = BLANK() &&
            hst_grdf_TEMP[GRDF_RESELLER_SALESFORCE_ID_NVL] <> BLANK(),
            1,
            0
        )
    )

    For your information: 

    1. Use SUMX when you need row-by-row evaluation on the same table being displayed

    2. Use CALCULATE when you need to change the filter context across different tables or apply complex filters

    3. To get quick and correct answer,  try to attached sample file with proper explanation. 

     

    Find this helpful? ✔ Give a Kudo • Mark as Solution – help others too!

     

2 Replies

  • Royel's avatar
    Royel
    Super User

    Hi alks_skla_f  

    this issue occured because its getting an (Filter Context Conflict).  When you select "Show items with no data"  Power BI tries to show all possible combinations, but here your measure itself has some filter which is causing context conflicts with the visual's row context. 

     

    You can try this dax 

    hst_grdf_TEMP_id_invl_null_and_not_null = 
    SUMX(
        hst_grdf_TEMP,
        IF(
            hst_grdf_TEMP[HST_RESELLER_SALESFORCE_ID_NVL] = BLANK() &&
            hst_grdf_TEMP[GRDF_RESELLER_SALESFORCE_ID_NVL] <> BLANK(),
            1,
            0
        )
    )

    For your information: 

    1. Use SUMX when you need row-by-row evaluation on the same table being displayed

    2. Use CALCULATE when you need to change the filter context across different tables or apply complex filters

    3. To get quick and correct answer,  try to attached sample file with proper explanation. 

     

    Find this helpful? ✔ Give a Kudo • Mark as Solution – help others too!