Forum Discussion

MrMP's avatar
MrMP
Helper III
6 years ago
Solved

Measure totals incorect using IF

Hello everyone,   I saw this issue many times, but I just cant seem to fix it.   I am working with sales data (Product hierarchy, customers, Locations etc). Currently model has 2 calendars. One a...
  • v-diye-msft's avatar
    6 years ago

    Hi MrMP 

     

    You might try something like :

    CALCBF_New =
    VAR _table =
        SUMMARIZE ( Table1, Table1[column], "_Value", [measure] )
    RETURN
        IF ( HASONEVALUE ( Table1[column] ), [measure], SUMX ( _table, [_Value] ) )