cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper I

## Encontrar la fecha mínima entre varias columnas

Holaaa, necesito ayuda en sacar la fecha min entre 4 columnas. El ejemplo sería:

primera fecha        segundafecha   tercera fecha   cuartafecha

2018/03/05            2015/05/20       2011/04/05     2021/02/15

El resultado entre la cuatro columnas debe de arrojar 2011/04/05,

Gracias

2 ACCEPTED SOLUTIONS
Community Support

Hi @tatac1412 ,

According to your description, I create a sample.

Here's my solution, create a measure.

``````Min =
VAR _T =
UNION (
VALUES ( 'Table'[Column1] ),
VALUES ( 'Table'[Column2] ),
VALUES ( 'Table'[Column3] ),
VALUES ( 'Table'[Column4] )
)
RETURN
MINX ( _T, [Column1] )
``````

Get the correct result.

I attach my sample below for reference.

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support

Hi @tatac1412 ,

Do you mean if there is a column has blank value like this:

By my test it does not affect the final result, it still get the min value in this scenario.

Best Regards,
Community Support Team _ kalyj

6 REPLIES 6
Community Support

Hi @tatac1412 ,

According to your description, I create a sample.

Here's my solution, create a measure.

``````Min =
VAR _T =
UNION (
VALUES ( 'Table'[Column1] ),
VALUES ( 'Table'[Column2] ),
VALUES ( 'Table'[Column3] ),
VALUES ( 'Table'[Column4] )
)
RETURN
MINX ( _T, [Column1] )
``````

Get the correct result.

I attach my sample below for reference.

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helper I

Muchas gracias por la solución, me puedes indicar también es esa medida como hago para que si en alguna de esas columnas esta vacia no tome ese campo como menor fecha??

```Min =
VAR _T =
UNION (
VALUES ( 'Table'[Column1] ),
VALUES ( 'Table'[Column2] ),
VALUES ( 'Table'[Column3] ),
VALUES ( 'Table'[Column4] )
)
RETURN
MINX ( _T, [Column1] )```

porque tengo campos vacios y la formula los arroja como fecha menor.

Gracias

Community Support

Hi @tatac1412 ,

Do you mean if there is a column has blank value like this:

By my test it does not affect the final result, it still get the min value in this scenario.

Best Regards,
Community Support Team _ kalyj

Helper I

Muchas gracias por la solución, te pregunto si en una de esas 4 columnas de fechas hay por ejemplo 1800/01/01 como fecha comodín como hago para que la función no la tome como fecha minima sino que coja otra fecha ; ejemplo colum 1(2001/08/05)   colum2( 2011/04/17)  colum3(1800/01/01 ) colum4(2022/05/09)

Super User

@tatac1412 , Try

Minx({[Col1],[Col2],[Col3],[Col4]}, [Value])

Helper I

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - July 2024

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

#### Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors