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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
javieezy
Helper I
Helper I

How to exclude blank value from extracting Min Values from Multiple Rows?

Dear all, 

 

So the problem is I need the minimum values of columns "ENDT", "ENDV", "ENDE" in the "RelevoStart" column, which should exclude null values

 

Formula of "RelevoStart" as: 

RelevoStart = MIN(MIN(DATA[ENDT],DATA[ENDE]),DATA[ENDV])

 

What should I do to be able to make exclude to null value in this calculation? Appreciate in advance any help. 

javieezy_0-1645461809181.png

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @javieezy ;

You could create a measure as follow:

 

Min = 
var _min1=MIN(MIN('Table'[ ENDV]),MIN('Table'[ENDE]))
var _min2=MIN(MIN('Table'[ENDT]),MIN('Table'[RelevoStart]))
return MIN(_min1,_min2)

 

The final output is shown below:

vyalanwumsft_0-1645680567079.png

 


Best Regards,
Community Support Team_ Yalan Wu
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

2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

Hi, @javieezy ;

You could create a measure as follow:

 

Min = 
var _min1=MIN(MIN('Table'[ ENDV]),MIN('Table'[ENDE]))
var _min2=MIN(MIN('Table'[ENDT]),MIN('Table'[RelevoStart]))
return MIN(_min1,_min2)

 

The final output is shown below:

vyalanwumsft_0-1645680567079.png

 


Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

Hi @javieezy I am wondering if you could Unpivot the Time Columns into a single column.  This will allow the following DAX calculations:

 

MIN of ENDV = CALCULATE ( MIN ( [Unpivot Time Value] ) , [Unpivot Time Attribute] = "ENDV") 
MIN of ALL = CALCULATE ( MIN ( [Unpivot Time Value] ) , [Unpivot Time Attribute] in { "ENDV" , "ENDT", "ENDE" } )) 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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