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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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