Forum Discussion

Birinder's avatar
Birinder
Icon for Helper III rankHelper III
4 years ago
Solved

How to create a new subtotal column from Measures ?

Hi there,   As in the first picture you can see that I have 3 columns. What I want to achieve here is the exact solution as picture second. Now I will explain.  As you can see there is a column na...
  • Greg_Deckler's avatar
    4 years ago

    Birinder I think  you want:

    Sub-Total Each Category Measure = 
      VAR __Quarter = MAX('Table'[Quarter])
    RETURN
      SUMX(FILTER(ALL('Table'),[Quarter]=__Quarter),[Sales])
    
    
    Margin Measure =
      [Sub-Total Each Category Measure] - MAX('Table'[Sales])