Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Items Per Order - DAX Measure

Hi Experts   How would you calculate the items per order based on the sample data in the table below.. For the first Order ID we have one item ordered and the distinct count of the Order Id = 1 so...
  • amitchandak's avatar
    amitchandak
    5 years ago

    Anonymous , Try like

    divide(SumX(filter(allselected(FACTSalesOrderTable) , FACTSalesOrderTable[Order ID] = max(FACTSalesOrderTable[Order ID])), FACTSalesOrderTable[Qty]), distinctcount(FACTSalesOrderTable[Order ID]))