Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Lets say we have some monitoring data, that holds timing delay information; for simplicity it looks like this:
Device | Event | Precise Delay (Hrs) | Long Delay |
A | X001 | 3.02 | Yes |
A | X002 | 5.23 | Yes |
A | X003 | 1.33 | No |
B | X004 | 0.28 | No |
B | X005 | 0.55 | No |
B | X006 | 24.56 | Yes |
C | X007 | 4.97 | Yes |
C | X008 | 1.31 | No |
C | X009 | 1.94 | No |
C | X010 | 18.31 | Yes |
C | X011 | 1.36 | No |
C | X012 | 3.08 | Yes |
C | X013 | 5.33 | Yes |
D | X014 | 1.14 | No |
D | X015 | 2.08 | Yes |
D | X016 | 6.55 | Yes |
D | X017 | 2.95 | Yes |
D | X018 | 2.16 | Yes |
E | X019 | 1.33 | No |
E | X020 | 1.44 | No |
E | X021 | 8.59 | Yes |
I want to add a column to it that would calculate the total delay for a device, both in general (easy) and where it is tagged as a 'Long delay', i.e. over 2 hours. I want to be able to generate a table like this:
Device | Total Delays | Long Delays ONLY |
A | 9.580248997 | 8.2515956 |
B | 25.394543 | 24.56379014 |
C | 36.30746792 | 31.69916456 |
D | 14.88382688 | 13.7454788 |
E | 11.35456822 | 8.591586806 |
All easy to do in Excel, but I'm looking at 20 million rows of data, so that won't work. I can get a single filter to work, but not two at once.
How do I fix this?
Thanks
Create a couple of measures like
Total Delay = SUM( 'Table'[Precise delay])
Long delay only =
CALCULATE ( SUM ( 'Table'[Precise delay] ), 'Table'[Long delay] = "Yes" )