Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Empty row not in Summarize table

Hi all,

 

I created a "Student Target (final)" measure by using SUMMARIZE function. However, it does not summarize the data when Country is blank. Does anyone know how I can improve on the measure so that 472 will appear in the Student Target (final) measure?

[Edited] Also, noticed the grand total is returning a very large number (32,205). Does anyone know how can I fix this to get 3,528 (1,695+1,833)?

 

Student Target (final) = 
var val=IF(SELECTEDVALUE(Dim_Country[Country])="Singapore",CALCULATE(_Measures[Local], ALL(Dim_Country[Country])), _Measures[International])
var tbl=ADDCOLUMNS(SUMMARIZE(Dim_Country, Dim_Country[Country]), "Target", val)
return
SUMX(tbl, [Target])
 

 

 

Regards,

BK

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Sorry, not very clear. Can you provide me with some dummy data and expected results, or share with me the pbix file.

    And I am a little puzzled where did 1,695 and 1,833 come from?

     

    For now, I can only suggest you to try

    IF(ISBLANK(Dim_Country[Country])),[Measure],Student Target (final))

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.