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
Murali777
Helper III
Helper III

Find minimum value between two rows

Hi,

 

I need to find Min value between two rows by using calculated measure not a calculated column. Please find the screenshot below.

 

Murali777_0-1651074824033.png

 

1 ACCEPTED SOLUTION
ribisht17
Super User
Super User

@Murali777  I hope it helped, if yes, please mark the solution so that it can help others as well

 

Regards,

Ritesh

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My You Tube Channel !! Connect on Linkedin

View solution in original post

8 REPLIES 8
v-henryk-mstf
Community Support
Community Support

Hi @Murali777 ,

 

Whether the advice given by @ribisht17  has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.


Looking forward to your feedback.


Best Regards,
Henry

ribisht17
Super User
Super User

@Murali777  I hope it helped, if yes, please mark the solution so that it can help others as well

 

Regards,

Ritesh

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My You Tube Channel !! Connect on Linkedin

ribisht17
Super User
Super User

@Murali777 

 

Step 1: Create an INDEX to your TABLE  from the Transform tab

 

Step 2: Get the next name from Top to Bottom

Name +1 = CALCULATE(min(MinMaxGrp[Name]),FILTER(all(MinMaxGrp),MinMaxGrp[Index]=EARLIER(MinMaxGrp[Index])+1))
 
Step 3: Similarly Get the Next Value as well for the Name with the below calculation 
 
Value +1 = CALCULATE(min(MinMaxGrp[Value]),FILTER(all(MinMaxGrp),MinMaxGrp[Index]=EARLIER(MinMaxGrp[Index])+1))
 
Step 4:
Value -1 = CALCULATE(min(MinMaxGrp[Value]),FILTER(all(MinMaxGrp),MinMaxGrp[Index]=EARLIER(MinMaxGrp[Index])-1))
 
 
Step 5: Get the Max out of Two
 
Max =
 IF(MinMaxGrp[Name]="A", max(MinMaxGrp[Value],MinMaxGrp[Value +1]),max(MinMaxGrp[Value],MinMaxGrp[Value -1]))
 
Step 5:
Final Solution as (We will nullify the values against B and Will keep only one Value )
 

Solution Max = IF(MinMaxGrp[Name]=MinMaxGrp[Name +1],0, IF(MinMaxGrp[Value]=MinMaxGrp[Max],MinMaxGrp[Value],0))
 
ribisht17_0-1651350575442.png

 


NOTE: I did it for Max and you have to Use Min 🙂

Regards,

Ritesh

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My You Tube Channel !! Connect on Linkedin

 

ribisht17
Super User
Super User

How are you grouping A and B,its not clear...

We need to consider only A and B combination rows and find min value for these combination, remaining should be empty.

Murali777
Helper III
Helper III

Hi Guys,

 

Please anyone help me on this.

I need to find the min values between two rows.


ribisht17
Super User
Super User

@Murali777  Information not sufficient 

 

Ritesh

Hi Ritesh,

 

Need to find the Min values column results. we need to figure out the min value for the combination of Name (A and B ) values. remaining should be empty result set.

 

Please help me on this scenario.

 

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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