Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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
User | Count |
---|---|
120 | |
69 | |
69 | |
57 | |
50 |
User | Count |
---|---|
167 | |
82 | |
68 | |
65 | |
53 |