Home > Blockchain >  get average of subtotal with respect to distinct purchaseorderid and product category in DAX
get average of subtotal with respect to distinct purchaseorderid and product category in DAX

Time:09-30

i don't know where to start, pretty new in power bi or Dax

enter image description here

CodePudding user response:

Try this code:

AverageOfSubTotal =
AVERAGEX (
    SUMMARIZE ( YourTable, YourTable[PurchaseOrderID], YourTable[ProductCategory] ),
    YourTable[SubTotal]
)

CodePudding user response:

Use this as a new Measure

Avg Subtotal = 
AVERAGEX(
    SUMMARIZE(
        'Table',
        'Table'[PurchaseOrderId],
        'Table'[ProductCategory],
        'Table'[SubTotal]
    ),
    'Table'[SubTotal]
)
  • Related