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

Min Dates (mutiple Columns) Power Query - possible blank values

Hi, 

 

Below i have a DAX function giving me the min. value of mutiple date values (columns). Does anyone know how to do this in PowerQuery? 

 

SuccessDateToUse =
VAR _remoteRental = IF(ISBLANK([Remote rental date]),DATE(9999,12,31),[Remote rental date])
VAR _remoteSales = IF(ISBLANK([Remote sales date]),DATE(9999,12,31),[Remote sales date])
VAR _PhysicalRental = IF(ISBLANK([Physical rental date]),DATE(9999,12,31),[Physical rental date])
VAR _PhysicalSale = IF(ISBLANK([Physical sales date]),DATE(9999,12,31),[Physical sales date])

VAR _calc1 =
IF(_remoteRental < _remoteSales,_remoteRental,_remoteSales)
VAR _calc2 =
IF(_calc1 < _PhysicalRental,_calc1,_PhysicalRental)
VAR _calc3 =
IF(_calc2 < _PhysicalSale,_calc2,_PhysicalSale)
RETURN
_calc3
1 ACCEPTED SOLUTION

A slight adjustment to AIB's formula should do it.  Sub in your column names (should all be Date type)

Table.AddColumn(#"Changed Type", "Custom", each List.Min({[rSales] , [rRental] , [PRental] , [PSale]}))

View solution in original post

3 REPLIES 3
AlB
Community Champion
Community Champion

Hi @Anonymous 

You could make one list of all four columns and then extract the minimum. Something like 

List.Min(Table1[Col1] & Table1[Col2] & Table1[Col3] & Table1[Col4]))

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

Anonymous
Not applicable

Hi @AlB , 

 

When i do this i get the following error

--> I think because for some values are "null"

 

Expression.Error: We cannot convert Type to List type.
Details:
Value=[Type]
Type=[Type]

A slight adjustment to AIB's formula should do it.  Sub in your column names (should all be Date type)

Table.AddColumn(#"Changed Type", "Custom", each List.Min({[rSales] , [rRental] , [PRental] , [PSale]}))

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.

Top Kudoed Authors