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
emveha
Resolver III
Resolver III

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
v-qiuyu-msft
Community Support
Community Support

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

3 REPLIES 3
v-qiuyu-msft
Community Support
Community Support

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.

THANK YOU - I was looking everywhere for a solution. This is great, Qiuyun! 

hi Qiuyun Yu,

 

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

M

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.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.