Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
reddeppag
Frequent 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
 AreaElement  Result  
H.0100H.0100.01.01.01   AreaElementRequired Result
H.0100H.0100.01.01.01  H.0100H.0100.01.01.014
H.0100H.0100.01.01.01  H.0100H.0100.01.01.022
H.0100H.0100.01.01.01  H.0130H.0130.01.033
H.0100H.0100.01.01.02  H.0130H.0130.04.015
H.0100H.0100.01.01.02     
H.0130H.0130.01.03     
H.0130H.0130.01.03     
H.0130H.0130.01.03     
H.0130H.0130.04.01     
H.0130H.0130.04.01     
H.0130H.0130.04.01     
H.0130H.0130.04.01     
H.0130H.0130.04.01     

 

Thank a Lot!!!

1 ACCEPTED SOLUTION
reddeppag
Frequent Visitor

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!!!!!!!!!!!

View solution in original post

3 REPLIES 3
reddeppag
Frequent Visitor

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!!!!!!!!!!!
Ashish_Mathur
Super User
Super User

Hi @reddeppag,

 

In the second suggestion posted by @v-yulgu-msft, the function should be COUNTA().


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-yulgu-msft
Employee
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] )
)

1.PNG

 

 

2. Based on your Input table, create a measure.

Required result = COUNT(Input[Element])

3.PNG

 

Then, in report view, insert a table visual, directly add above measure into visual.

4.PNG

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.