Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have been asked to do a day and occurrence count, the only tricky thing about it is that it needs to look at a certain hierarchy it is the follwoing:
Manual black > manual red > model black > model red
So the highest hieararchy is manual black. Each one of them is a measure calculated in percentage of time. I'll create a table to hopefully give enough example data:
Location | Manual Black | Model Black | Manual Red | Model Red | Green |
ABC | 4% | 40% | 56% | ||
DEF | 1% | 4% | 10% | 5% | 80% |
GHI | 51% | 10% | 39% | ||
JKL | 1% | 60% | 39% |
So, per the requirements, there should be the following in the counts:
2 days with manual black
1 day with manual red
1 day with model black.
To my understanding, an IF or SWITCH function may work, though how can I apply that to a hierarchy?
Hi @AmazingRandom ,
So, per the requirements, there should be the following in the counts:
2 days with manual black
1 day with manual red
1 day with model black.
It would be helpful if you could elaborate on the computational logic behind these results, thanks.
How to Get Your Question Answered Quickly - Microsoft Fabric Community
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
I'm not sure I understand your question. The results are just an example. I asume you meant how they are calculated.
They are calculated by a Divide formula, where it gets values from three columns. An overflow column, which says if it is overflown (automatic black) or green.
A manual status column, whether it is defined as red manual, black manual or none (green).
Then a system model where it will show if it is a predicted red or green.
Then the measures divide the instances on each based the number of rows by the total rows, some conditions are applied to avoid overlapping and match the hierarchy.
I hope I made sense to you explaining it
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
67 | |
65 | |
57 | |
39 | |
27 |
User | Count |
---|---|
85 | |
59 | |
45 | |
43 | |
38 |