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

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

Reply
rantel
New Member

Use MIN in measure, calculated row wise without aggregation

How to get the MIN of two dates in a Measure function without any aggregation. This can be done using a computed column but the issue is that it is not computed dynamically. 

See screenshot:

EndDate: is a measure column coming from End_Calendar table and the slicer.

Expected output: For each row, I want the MIN date of the two columns ColDateEnd & EndDate. As shown MinEndDateCalculatedCol gives me the MIN of the two but it is calculated once when the column is added. I learned Measure is computed dynamically. But Measure works at an aggregation level whereas I want to compute the MIN for each row.

I'm a newbie to DAX. 

Any alternatives for computing the MIN for each row dynamically? 

 

rantel_0-1684380212602.png

rantel_2-1684381103178.pngrantel_3-1684381127922.png

 

rantel_1-1684381078749.png

 

Sample Table = {
    (1,"the first row",DATE(2019,1,1), DATE(2019,3,1)),
    (2,"the second row",Date(2020,4,12), DATE(2020,5,1)),
    (3,"the thrid row",Date(2020,5,12), DATE(2020,6,1))
    }
1 ACCEPTED SOLUTION
tackytechtom
Super User
Super User

Hi @rantel ,

 

How about this:

Measure = 
VAR _temp = { MIN ( 'Sample Table'[Value3] ), MIN ('Sample Table'[Value4]) }
RETURN
MINX ( _temp, [Value] )

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

4 REPLIES 4
tackytechtom
Super User
Super User

Hi @rantel ,

 

How about this:

Measure = 
VAR _temp = { MIN ( 'Sample Table'[Value3] ), MIN ('Sample Table'[Value4]) }
RETURN
MINX ( _temp, [Value] )

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Thanks Tom. This worked. Just had to do a small tweak to remove the MIN function call for the Measure column.

Measure = 
VAR _temp = { MIN ( 'Sample Table'[Value3] ), 'Sample Table'[Value4] }
RETURN
MINX ( _temp, [Value] )
danextian
Super User
Super User

Hi @rantel ,

 

You still have to aggregate. MIN function takes either a column or two expressions but not an expression and anotherr column. Wrap the date column in MIN, MAX or SELECEDVALUE to satisfy its requirement. Your formula should be:

=
MIN ( MIN ( 'Sample Table'[ColDateEnd] ), [EndDate] )

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Thanks for the quick response @danextian - I could not get this working. Since the other solution worked, I stopped exploring this. Thank you.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.