cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
emveha Member
Member

percentage grand total from a count distinct

hi all,

 

am having a small issue with a new measure i want to make and this is the case:

the report contains casenumbers (like 123456) which i transformed via count to a nr and next to the case nr i have a type (cancellation/delivery). At the end i have 2 columns:

count of caseNumbers     Type

100                                    delivery

50                                      cancellation

Now i want to have a third column (new measure) with the percentage of the grand total (=150). Example for type delivery the percentage is 67%.

any ideas how to do this especially as the case numbers needs to be counted....

thanks in advance

M

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator v-qiuyu-msft
Moderator

Re: percentage grand total from a count distinct

Hi @emveha,

 

Assume data likes below: 

 

w1.PNG

 

You can create a measure below: 

 

Percentage = var t=SUMMARIZE(ALL(Table1),Table1[Type],"count",DISTINCTCOUNT(Table1[CaseNumber]))
return
DIVIDE(CALCULATE(DISTINCTCOUNT(Table1[CaseNumber]),ALLEXCEPT(Table1,'Table1'[Type])),SUMX(t,[count]))

 

w2.PNG

 

 

 

Best Regards,
Qiuyun Yu 

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

View solution in original post

2 REPLIES 2
Moderator v-qiuyu-msft
Moderator

Re: percentage grand total from a count distinct

Hi @emveha,

 

Assume data likes below: 

 

w1.PNG

 

You can create a measure below: 

 

Percentage = var t=SUMMARIZE(ALL(Table1),Table1[Type],"count",DISTINCTCOUNT(Table1[CaseNumber]))
return
DIVIDE(CALCULATE(DISTINCTCOUNT(Table1[CaseNumber]),ALLEXCEPT(Table1,'Table1'[Type])),SUMX(t,[count]))

 

w2.PNG

 

 

 

Best Regards,
Qiuyun Yu 

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

View solution in original post

emveha Member
Member

Re: percentage grand total from a count distinct

hi Qiuyun Yu,

 

thanks for swift response and offering this solution, it works!!

M

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 134 members 1,874 guests
Please welcome our newest community members: