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
Anonymous
Not applicable

Count / percentage

Hi,

I have a column with 3 different entries in it (Early, Late & On-Time). I'm looking to count the number of entries for each(Early, Late & On-time) and then have that as a percentage of the total amount of entries (i.e. 100 entries, 10 are on time, therefore return 10%) on a monthly basis graph.

Is this possible..?

In the first graph, the percentage of cases is divided on the whole.
But I am looking for something like the second image for evry month.

abc.PNG

def.PNG

1 ACCEPTED SOLUTION

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Sorry it didn't worked for me. Could you please explain the dax formula.

Heer is the sample Data. Due to the security reasons, I cannot share the origincal data but  I have made some dummy data which looks similar to the orginical

Unique IDID numberDate of surgical StartActual vs Scheduled Range
2315912/12/2021On-time
1235922/12/2021Delayed
56953212/12/2021Delayed
8541234/11/2021Delayed
7456942/11/2021On-time
7452352/10/2021Delayed
7452152/10/2021early
9563262/10/2021early
4523179/10/2021On-time
45284810/10/2021Delayed
54165912/10/2021early
4521394/16/2021Delayed


Here is the  graph which i am able to get.
12354.PNG
In the image, if you see september, 14.33% of delayed, 0.28% of Early & on-time. I want it to be 96.29% of delayed & 1.85% of Early& on-time.

Th output image you have provided is exactly what i am looking for my graph. However, I didn't understand what fields you are using.

Appreciate your help.

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
sevenhills
Super User
Super User

Without data it is tough to do the measure ... This is what I assume you need and providing the measure details and steps.

 

Sample data

sevenhills_0-1639597739955.png

 

what you have already is simple clustered column chart, with % of Grand Total chart

sevenhills_1-1639597792321.png

 

What you want is % of Total within Group ... by month and category

a) Measure

% of Total within Group = 
VAR _Grp = values(Table3[Date].[MonthNo])
VAR _val = CALCULATE( sum(Table3[Total Entries]), ALLEXCEPT(Table3, Table3[Name]), _Grp)
RETURN divide (sum(Table3[Total Entries]), _val)

 

b) clustered column chart

sevenhills_3-1639597885027.png

 

c) output 

 

sevenhills_2-1639597825607.png

 

Hope this helps!

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.