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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
i820017
Resolver II
Resolver II

Percent of Total

I am trying to create an explicit measure for percent of total for 'Procedure Request Form'[Reason for Ticket Request].

 

Here is the DAX that I am using, and the output that it is yielding. (Each bar graph is 100%).

 

i820017_0-1649697855139.png

 

Can anyone tell me how I can fix this? I do not want to use an implicit measure.

 

1 ACCEPTED SOLUTION

@i820017 
I see the mistake there, you are using "ALL" filter wrong, you have to put a Table there not Column, modify it to: 

COUNTROWS(ALL('Procedure Request Form'))

 

View solution in original post

11 REPLIES 11
i820017
Resolver II
Resolver II

Here is a screen shot of the data that I am looking at.

 

i820017_0-1649769139801.png

 

 

@i820017 
Change the total calculation to something like this:

COUNTROWS(ALL(procedure request form))



When I used COUNTROWS(ALL(procedure request form)), this is what I got.

 

i820017_0-1649771660430.png

 

@i820017 
but you changed the Numerator (so I am not sure what that is now).
Please if you could share a copyable dataset, I can create a custom made solution for you.

Here is a copyable dataset.

 

i820017_0-1649772258023.png

 

 

 

@i820017 

vojtechsima_0-1649772847574.png

% of Reasons = 

var reasons = COUNT('Reason for Ticket Request'[Reason])
Var Total = COUNTROWS(ALL('Reason for Ticket Request'))

return FORMAT(DIVIDE(reasons, Total), "Percent")

Here you go.
Also, please note, copyable means that I can copy the data into Power BI and I have the dataset, so it means something like this:
DateCategoryQuarter

01.03.2022 Media 1
01.02.2022 Media 1
01.02.2022 Media 1
01.02.2022 Media 1
01.01.2022 Media 1
01.12.2021 Media 4
01.12.2021 Media 4
01.12.2021 Media 4
01.03.2022 Sports 1
01.03.2022 Sports 1
01.01.2022 Sports 1
01.01.2022 Sports 1
01.11.2021 Sports 4
01.11.2021 Sports 4
01.11.2021 Sports 4
01.10.2021 Sports 4



That didn't work. Here is the output that I got.

 

i820017_0-1649773823913.png

 

@i820017 
I see the mistake there, you are using "ALL" filter wrong, you have to put a Table there not Column, modify it to: 

COUNTROWS(ALL('Procedure Request Form'))

 

This worked...Thanks!!

@i820017 
You're welcome, if you could please kudo answers that helped you. Thank you

vojtechsima
Memorable Member
Memorable Member

Hi, @i820017 
That seems okay, could you please share a sample dataset (copyable), please?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.