Forum Discussion
reddeppag
8 years agoFrequent Visitor
DAX - Grouping on multiple columns and the count
I have a DB table which has data as the following:
Please help on the below task asap.
| Input Data | Output Data | |||||
| Area | Element | Result | ||||
| H.0100 | H.0100.01.01.01 | Area | Element | Required Result | ||
| H.0100 | H.0100.01.01.01 | H.0100 | H.0100.01.01.01 | 4 | ||
| H.0100 | H.0100.01.01.01 | H.0100 | H.0100.01.01.02 | 2 | ||
| H.0100 | H.0100.01.01.01 | H.0130 | H.0130.01.03 | 3 | ||
| H.0100 | H.0100.01.01.02 | H.0130 | H.0130.04.01 | 5 | ||
| H.0100 | H.0100.01.01.02 | |||||
| H.0130 | H.0130.01.03 | |||||
| H.0130 | H.0130.01.03 | |||||
| H.0130 | H.0130.01.03 | |||||
| H.0130 | H.0130.04.01 | |||||
| H.0130 | H.0130.04.01 | |||||
| H.0130 | H.0130.04.01 | |||||
| H.0130 | H.0130.04.01 | |||||
| H.0130 | H.0130.04.01 |
Thank a Lot!!!
- I got the solution on the below question NumberOfOpenPO's = CALCULATE ( COUNTROWS ( VendorData), ALLEXCEPT ( VendorData,VendorData[Delivery Area], VendorData[WBS Element],VendorData[Agebucket]) ) Happy Coding!!!!!!!!!!!
3 Replies
- v-yulgu-msft
Microsoft Employee
Hi reddeppag,
Two ways for your reference.
1. Create a calculated table like below.
Output = SUMMARIZE ( Input, Input[Area], Input[Element], "Count value", COUNT ( Input[Element] ) )
2. Based on your Input table, create a measure.
Required result = COUNT(Input[Element])
Then, in report view, insert a table visual, directly add above measure into visual.
Best regards,
Yuliana Gu - reddeppagFrequent VisitorI got the solution on the below question NumberOfOpenPO's = CALCULATE ( COUNTROWS ( VendorData), ALLEXCEPT ( VendorData,VendorData[Delivery Area], VendorData[WBS Element],VendorData[Agebucket]) ) Happy Coding!!!!!!!!!!!
- Ashish_Mathur
Super User