cancel
Showing results for
Did you mean:
Highlighted
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....

M

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator

## Re: percentage grand total from a count distinct

Hi @emveha,

Assume data likes below:

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]))

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.
2 REPLIES 2
Moderator

## Re: percentage grand total from a count distinct

Hi @emveha,

Assume data likes below:

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]))

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.
Member

## Re: percentage grand total from a count distinct

hi Qiuyun Yu,

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

M

Announcements

#### Challenge: Can You Solve These?

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

#### Community News & Announcements

Get your latest community news and announcements.

#### 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.

#### Win Power BI Swag with Community Kudopalooza!

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

Top Kudoed Authors
Users Online
Currently online: 134 members 1,874 guests
Recent signins: