Forum Discussion
Anonymous
4 years agoNot applicable
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 Name | Contractor | Status |
| Site1 | ABC | In Progress |
| Site2 | XYZ | New |
| Site3 | ABC | New |
| Site4 | ABC | In Progress |
| Site5 | ABC | In Progress |
| Site6 | XYZ | In Progress |
| Contractor | Status | Total Count | % Parent Row |
| ABC | New | 1 | 25% |
| In Progress | 3 | 75% | |
| XYZ | New | 1 | 50% |
| In Progress | 1 | 50% |
How could i able to achieve this in simple calculation formula?
Thanks in advance.
Anonymous
My Video on ALLEXCEPT concept https://youtu.be/fEIaJigVfFg
Step 1
Count of Contractor = count('Count'[Contractor])Step 2Total Count per Contractor = CALCULATE(COUNT('Count'[Contractor]),ALLEXCEPT('Count','Count'[Contractor]))Step 3Solution Count = DIVIDE('Calendar Table'[Count of Contractor],'Calendar Table'[Total Count per Contractor])Regards,RiteshMark 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 UsersAnonymous ,
Did it help, can you mark the post and help the community?
Regards,
Ritesh
3 Replies
- ribisht17Super User
Anonymous
My Video on ALLEXCEPT concept https://youtu.be/fEIaJigVfFg
Step 1
Count of Contractor = count('Count'[Contractor])Step 2Total Count per Contractor = CALCULATE(COUNT('Count'[Contractor]),ALLEXCEPT('Count','Count'[Contractor]))Step 3Solution Count = DIVIDE('Calendar Table'[Count of Contractor],'Calendar Table'[Total Count per Contractor])Regards,RiteshMark 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 - ribisht17Super User
Anonymous
Please close the post so that it will be helpful for others as well
Regards,
Ritesh
- ribisht17Super User
Anonymous ,
Did it help, can you mark the post and help the community?
Regards,
Ritesh