Forum Discussion

wvanpeel's avatar
wvanpeel
Advocate II
3 years ago
Solved

Subtotaling at higher level

I'm trying to subtotal at the level of SalesOrderID ,   

PlantSalesOrder IDDelivery IDSales Order QtyDelivery Qty
A13316029
A13326031
A155109030
A155209028
A155309030
   390148
Report MatrixPlantTotal Sales Order QtyTotal Delivery Qty 
 A150148 
     
  How to subtotal a SalesOrder ID level ??  
  • Ok, I think you are looking for the total by sales order without delivery ID.

     

    In that case, you can summarize this data and not include Delivery ID in the summary table.

     

    Something like this:

     

    New Table= SUMMARIZE(Tablename, Tablename[Plant], Tablename[SalesOrder ID], "Order QTY", MAX(Tablename[Sales Order Qty], "Delivery Qty", SUM(Tablename[Delivery Qty]))

     

    https://learn.microsoft.com/en-us/dax/summarize-function-dax

     

    Please consider accepting as solution if this resolves the issue- thanks!

3 Replies

  • Ok, I think you are looking for the total by sales order without delivery ID.

     

    In that case, you can summarize this data and not include Delivery ID in the summary table.

     

    Something like this:

     

    New Table= SUMMARIZE(Tablename, Tablename[Plant], Tablename[SalesOrder ID], "Order QTY", MAX(Tablename[Sales Order Qty], "Delivery Qty", SUM(Tablename[Delivery Qty]))

     

    https://learn.microsoft.com/en-us/dax/summarize-function-dax

     

    Please consider accepting as solution if this resolves the issue- thanks!

    • wvanpeel's avatar
      wvanpeel
      Advocate II

      Yes I have, you can see this in the first list.  The 2nd visual is a matrix, I need the subtotal of Sales Order Qty to behave correct. Total should be 150.