Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Add custom subtotal rows

Dear all,   I have raw data: account codes and values. The challenge is to show custom subtotals in the same table as the accoundtcodes. Use case: finance (profit and loss statement with groupings ...
  • Greg_Deckler's avatar
    Greg_Deckler
    5 years ago

    Anonymous That would work or if you had an additional column in your data or if you added a calculated column in M code or as a calculated column in DAX, such as:

    Group Code Column = 
      SWITCH(TRUE(),
        [Code] = "0010" || [Code] = "0020","0025",
        [Code]
      )