Forum Discussion
warabimochi
1 year agoRegular Visitor
Sum values for each category
Hi, I am new to PBI and I would like to know how to derive the number of orders placed for each fruit using DAX. Customer ID Order Date Fruit quantity OrderCount 1 0...
- 1 year ago
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Order count: = SUMX ( VALUES ( Fruit[Fruit] ), COUNTROWS ( CALCULATETABLE ( FILTER ( SUMMARIZE ( Data, Data[Customer ID], Data[Order Date], Data[quantity] ), Data[quantity] > 0 ) ) ) )
shafiz_p
Super User
1 year agoHi warabimochi Try this to create a measure :
TotalOrders =
SUMX(
VALUES('Table'[Fruit]),
CALCULATE(SUM('Table'[OrderCount]))
)
Output:
Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!
Best Regards,
Shahariar Hafiz