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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
reynold522
Helper II
Helper II

max value of measure (not a column from table) and count of this measure with threshold defined

Hi all, 

 

I have a lot of IoT devices. which uploaded voltage value with sample rate 1 minute into cloud.

raw table will be like following:

IoT IDVoltage  (V)time 
12.25:07
255:07
32.25:07
41.65:07
13.25:08
275:08
31.85:08
415:08
155:09
225:09
345:09
42.15:09
125:10
225:10
31.25:10
41.25:10

 

then a summerized Table will be like following:

 

I create a measure to get  duration with voltage<3V (min) accumulated.

 

then If I put table visualization with this measure combine with IoT ID

then it will like following in Power BI 

IoT IDduration  Voltage<3V (min)
12
22
33
44

 

I would like to write Dax code to get two value in the table above:

1. count number of row with duration >3 min: 2 in this case

2. max. value of duration: 4 in this case

 

Thanks in advance

 

Best regards

 

Renhao

2 REPLIES 2
Anonymous
Not applicable

Hi @reynold522 

 

1.max = MAX('Table'[vtg])

2. Count rows = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[vtg]>=1))

 

Output:

shreyamukkawar_0-1670247364836.png

Best Regards,
Shreya Mukkawar

Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

Hi Shreyamukkawar, 

 

Thank you for the fastest speed to answer my question. 

I may not explain my question clearly.

 

The table is a visualizations table from power BI. it is not a real table in Power BI Field. 

Visualizations table is a result, accumlulated duration (hour) is asgined for each IoT ID and show as table in Power BI 

 

The max function wont work as there is no table, no column.

 

However, Still thanks

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.