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
Anonymous
Not applicable

Calculate or Measure Min and Max data to get interval

i really confused with this case i need min and max data SMU Down to get interval. how about that?

 
Unit NumberMin Down SMUMax SMUInterval
CE4223106.920.730 
 
1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

We can create a calculate column or a measure to meet your requirement.

 

1. The measure and result like this,

 

Interval = 
var min_ = CALCULATE(MIN('Table'[DownSMU]),FILTER(ALLSELECTED('Table'),'Table'[EquipmentID]=MAX('Table'[EquipmentID])))
var max_ = CALCULATE(MAX('Table'[DownSMU]),FILTER(ALLSELECTED('Table'),'Table'[EquipmentID]=MAX('Table'[EquipmentID])))
return
max_ - min_

 

Cal1.jpg

 

2. Or we can create a calculate column,

 

Column = 
var min_ = CALCULATE(MIN('Table'[DownSMU]),FILTER('Table',EARLIER('Table'[EquipmentID])='Table'[EquipmentID]))
var max_ = CALCULATE(MAX('Table'[DownSMU]),FILTER('Table',EARLIER('Table'[EquipmentID])='Table'[EquipmentID]))
return
max_ - min_

 

Cal2.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

BTW, pbix as attached.

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Input Data

EquipmentIDDownSMU
CE4223106,9
CE42238483,2
CE422313673,1
CE422313761,1
CE422313805
CE422313805
CE422313805
CE422313805
CE422313809,4

Output Data

EquipmentIDMinMaxInterval
CE4223106,913809,413702,5

 

 

Hi @Anonymous ,

 

We can create a calculate column or a measure to meet your requirement.

 

1. The measure and result like this,

 

Interval = 
var min_ = CALCULATE(MIN('Table'[DownSMU]),FILTER(ALLSELECTED('Table'),'Table'[EquipmentID]=MAX('Table'[EquipmentID])))
var max_ = CALCULATE(MAX('Table'[DownSMU]),FILTER(ALLSELECTED('Table'),'Table'[EquipmentID]=MAX('Table'[EquipmentID])))
return
max_ - min_

 

Cal1.jpg

 

2. Or we can create a calculate column,

 

Column = 
var min_ = CALCULATE(MIN('Table'[DownSMU]),FILTER('Table',EARLIER('Table'[EquipmentID])='Table'[EquipmentID]))
var max_ = CALCULATE(MAX('Table'[DownSMU]),FILTER('Table',EARLIER('Table'[EquipmentID])='Table'[EquipmentID]))
return
max_ - min_

 

Cal2.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

BTW, pbix as attached.

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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