Forum Discussion

guyinazo's avatar
guyinazo
Helper I
4 years ago
Solved

Aggregated subtotal Measure

I need to wrap my head around this and I am sure  it is a simple DAX function, but I have the following sample data:   Order Amount 38008703 239.69 38008703 116.50   This is just a...
  • bcdobbs's avatar
    4 years ago

    Once data is in power bi select your order id column:

    and at the top set it to "Don't Summarise"

    (because it is a number power bi assumes you want to add it up)

     

    Check that the Amount column has summarization set to "Sum".

     

    If you then create matrix visual like this:

    Power Bi will do what you require:

    Doing it this way Power Bi does the aggragation for you in the background implicitly.

     

    You can however create a measure explictly to do the same thing. RIght click the table and click "Create Measure" and then use the following code:

     

    Order Amount = SUM ( Orders[Amount] )