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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
stalerik
Helper II
Helper II

DAX help - create column with minimum value so far inside a group

Hello all,

 

I am looking for some help to create a calculated column which holds the minimum value recorded in a group. 

 

I have an Index, Group, and Value column.  The Lowest column should be the minimum value recorded in that group up to the index.

 

I thought this would be easy by filtering the Index to calculate the minumum value (MINX) between Index between Group and current Index but I just get zero.  I think it's finding the minumum value in the whole range insteas of evaluating row by row.

 

Here is some data to explain hwo the lowest should work:

 

IndexGroupValueLowest
232366
242333
252383
262393
272722
282742
292732
302700
312710
323266
333255
343233
353243
363273
373293
383211

 

Thanks for any ideas and help!

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @stalerik 

 

Please try the below.

 

Picture3.png

 

Lowest CC =
VAR currentgroup = 'Table'[Group]
RETURN
CALCULATE (
MIN ( 'Table'[Value] ),
FILTER (
'Table',
'Table'[Group] = currentgroup
&& 'Table'[Index] <= EARLIER ( 'Table'[Index] )
)
)

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi, @stalerik 

 

Please try the below.

 

Picture3.png

 

Lowest CC =
VAR currentgroup = 'Table'[Group]
RETURN
CALCULATE (
MIN ( 'Table'[Value] ),
FILTER (
'Table',
'Table'[Group] = currentgroup
&& 'Table'[Index] <= EARLIER ( 'Table'[Index] )
)
)

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thank you very much again @Jihwan_Kim .  This is the second time you have helped me quickly with a problem.  Your solutions have been fantastic and understandable, and I appreciate the help!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.