Forum Discussion

DPCCGF's avatar
DPCCGF
Helper IV
1 year ago
Solved

Matrix Summary Row Total

Hello, I have a Matrix with Column Headers of Months and Row Headers for Account Summary, Account Group and Account.  The Summary is Gross Margin, Operating Expenses, Other Income and Other Expense. ...
  • DPCCGF's avatar
    DPCCGF
    1 year ago

    Thank you Rita, let me check the video.  If it works great!  If not I will send out the pbix file.  Thank you for your solution on the other item as well. 

  • Ritaf1983's avatar
    Ritaf1983
    1 year ago

    Hi DPCCGF 
    You can create Dax formula like mine (Dividing by a million is only to reduce the cognitive load of dealing with too many digits; you can skip it if you'd like.)

    Bud_ =
    var
    budget_ = sum('Balances'[Budget])
    var
    Gross_ = CALCULATE(sum('Balances'[Budget]),FILTER('Balances','Balances'[Account Summary]="Gross Margin"))
    VAR
    Operating_ = CALCULATE(sum('Balances'[Budget]),FILTER('Balances','Balances'[Account Summary]="Operating Expenses"))
    Var
    Other_ex = Operating_ = CALCULATE(sum('Balances'[Budget]),FILTER('Balances','Balances'[Account Summary]="Other Expenses"))
    VAR
    Other_in=  CALCULATE(sum('Balances'[Budget]),FILTER('Balances','Balances'[Account Summary]="Other Income"))
    RETURN
    if(HASONEFILTER(Balances[Account Summary]),budget_,Gross_-Operating_-Other_ex+Other_in)/1000000
     
    Result :

    The sample logic should be applied to all the measures.
    The pbix is attached

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