Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi all - I'm trying to get a percentage of overdue registrations per category. A data sample is below. The registrations should be counted, not summed.
Category | Status | Registration |
Apple | Not Due | 4600 |
Orange | Not Due | 4218 |
Pear | Overdue | 4696 |
Strawberry | Overdue | 4215 |
Orange | Overdue | 4050 |
Pear | Not Due | 4491 |
Apple | Overdue | 3291 |
Strawberry | Not Due | 2026 |
Strawberry | Not Due | 2365 |
Apple | Not Due | 2943 |
Strawberry | Overdue | 2247 |
Pear | Not Due | 4143 |
Orange | Overdue | 2353 |
Orange | Not Due | 2010 |
Pear | Not Due | 3502 |
If I manually perform the calcuation in Excel, it looks like this:
Status | ||||
Category | Not Due | Overdue | TOTAL | % Overdue |
Apple | 2 | 1 | 3 | 33% |
Orange | 2 | 2 | 4 | 50% |
Pear | 3 | 1 | 4 | 25% |
Strawberry | 2 | 2 | 4 | 50% |
The answer I'm looking for is highlighted red above. I tried, couldn't figure it out LOL. Any help is appreciated, many thanks.
Solved! Go to Solution.
hi @elle-queue ,
plot a measure like:
%Overdue =
VAR _overdue =
COUNTROWS(
FILTER(
data,
data[status]="Overdue"
)
)
VAR _total = COUNTROWS(data)
RETURN DIVIDE(_overdue, _total)
it worked like:
CountOverdue =
CALCULATE(
COUNT('YourTable'[Registration]),
'YourTable'[Status] = "Overdue"
)
TotalRegistrations =
CALCULATE(
COUNT('YourTable'[Registration])
)
PercentageOverdue =
DIVIDE([CountOverdue], [TotalRegistrations], 0) * 100
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
hi @elle-queue ,
plot a measure like:
%Overdue =
VAR _overdue =
COUNTROWS(
FILTER(
data,
data[status]="Overdue"
)
)
VAR _total = COUNTROWS(data)
RETURN DIVIDE(_overdue, _total)
it worked like:
@elle-queue
You can try the following measure:
Let me know if that works. Kudos!
Thank you @HamedM1125 . This isn't exactly what I was wanting, but I can see how it could be useful for something else i'm working on, so thank you!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
86 | |
82 | |
70 | |
49 |
User | Count |
---|---|
143 | |
123 | |
107 | |
61 | |
55 |