Forum Discussion
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.
3 Replies
- sevenhills
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
what you have already is simple clustered column chart, with % of Grand Total chart
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
c) output
Hope this helps!
- AnonymousNot 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 orginicalUnique ID ID number Date of surgical Start Actual vs Scheduled Range 23159 1 2/12/2021 On-time 12359 2 2/12/2021 Delayed 56953 2 12/12/2021 Delayed 85412 3 4/11/2021 Delayed 74569 4 2/11/2021 On-time 74523 5 2/10/2021 Delayed 74521 5 2/10/2021 early 95632 6 2/10/2021 early 45231 7 9/10/2021 On-time 45284 8 10/10/2021 Delayed 54165 9 12/10/2021 early 45213 9 4/16/2021 Delayed
Here is the graph which i am able to get.
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.- Ashish_Mathur
Super User