Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Calculate values meeting multiple Criteria only?

Lets say we have some monitoring data, that holds timing delay information; for simplicity it looks like this:

 

DeviceEventPrecise Delay (Hrs)Long Delay
AX001   3.02Yes
AX002   5.23Yes
AX003   1.33No
BX004   0.28

No

BX005

   0.55

No
BX006   24.56Yes
CX007   4.97Yes
CX008   1.31No
CX009   1.94No
CX010   18.31Yes
CX011   1.36No
CX012   3.08Yes
CX013   5.33Yes
DX014   1.14No
DX015   2.08Yes
DX016   6.55Yes
DX017   2.95Yes
DX018   2.16Yes
EX019   1.33No
EX020   1.44No
EX021   8.59Yes

 

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:

 

DeviceTotal DelaysLong Delays ONLY
A9.580248997   8.2515956
B25.394543   24.56379014
C36.30746792   31.69916456
D14.88382688   13.7454788
E11.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

1 REPLY 1
johnt75
Super User
Super User

Create a couple of measures like

Total Delay = SUM( 'Table'[Precise delay])

Long delay only =
CALCULATE ( SUM ( 'Table'[Precise delay] ), 'Table'[Long delay] = "Yes" )

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.