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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
ivandgreat
Helper II
Helper II

Calculate Count Parent Child

Dears,

I'm just a newbie using Dax formula or power query.

I have a table which i wanted to get the percentage value based on the parent child relationship.

 

Site NameContractorStatus
Site1ABCIn Progress
Site2XYZNew
Site3ABCNew
Site4ABCIn Progress
Site5ABCIn Progress
Site6XYZIn Progress

 

ContractorStatusTotal Count% Parent Row
ABCNew125%
 In Progress375%
XYZNew150%
 In Progress150%

 

 

How could i able to achieve this in simple calculation formula?

 

Thanks in advance.

2 ACCEPTED SOLUTIONS
ribisht17
Super User
Super User

@ivandgreat 

My Video on ALLEXCEPT concept https://youtu.be/fEIaJigVfFg

Step 1

Count of Contractor = count('Count'[Contractor])
 
Step 2
Total Count per Contractor = CALCULATE(COUNT('Count'[Contractor]),ALLEXCEPT('Count','Count'[Contractor]))
 
Step 3
Solution Count = DIVIDE('Calendar Table'[Count of Contractor],'Calendar Table'[Total Count per Contractor])
 
ribisht17_0-1656823183534.png

 

Regards,
Ritesh
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 

View solution in original post

ribisht17
Super User
Super User

@ivandgreat ,

 

Did it help, can you mark the post and help the community?

 

Regards,

Ritesh

View solution in original post

3 REPLIES 3
ribisht17
Super User
Super User

@ivandgreat ,

 

Did it help, can you mark the post and help the community?

 

Regards,

Ritesh

ribisht17
Super User
Super User

@ivandgreat 

 

Please close the post so that it will be helpful for others as well

 

Regards,

Ritesh

ribisht17
Super User
Super User

@ivandgreat 

My Video on ALLEXCEPT concept https://youtu.be/fEIaJigVfFg

Step 1

Count of Contractor = count('Count'[Contractor])
 
Step 2
Total Count per Contractor = CALCULATE(COUNT('Count'[Contractor]),ALLEXCEPT('Count','Count'[Contractor]))
 
Step 3
Solution Count = DIVIDE('Calendar Table'[Count of Contractor],'Calendar Table'[Total Count per Contractor])
 
ribisht17_0-1656823183534.png

 

Regards,
Ritesh
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors