Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Insert Calculated row as new item under existing variable

Hi,  I am new to DAX query, could you please help me to know how to create an calculated new item under existing variable.   So i neeed the Combination of Items(0.5L and RW) under brand vari...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Anonymous,

    Change your DAX to the following:

    NewTable=UNION(Table,ROW("Brand", "BUD_0.5L_RW",  
             "Vol", "","Type","","Month","","Sales",CALCULATE(SUM(Table[Sales]),FILTER(Table,Table[Brand]="BUDWEISER"&&Table[Vol]="0.5 L"&&Table[Type]="RW")  )))



    Regards,
    Lydia