Forum Discussion

brankocareer's avatar
brankocareer
Icon for Helper I rankHelper I
2 years ago
Solved

Total value is not right in Matrix table

Hi all, I need some hlep to calculate the total in a matrix table. When calculte each category, the condition applied is different. When calculate "SALARIES", the [Document Type] must to be "PY", fo...
  • lbendlin's avatar
    2 years ago

    APR = 
    var a = SUMMARIZE('Rollup Master',[Rollup for Forecast Account Category],[Account Rollup for Corporate Report],[Document Type])
    var b = ADDCOLUMNS(a, "amt",CALCULATE(sum('Rollup Master'[Amount])))
    return sumx(filter(b,[Document Type]="PY" || [Rollup for Forecast Account Category]<>"SALARIES"),[amt])