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
BWL
Helper II
Helper II

Compare columns with BLANK ()

Dear users,

I was always able to manage my dax queries by reading the forum or search on the internet. But unfortunatly iam completely stuck with this DAX formula. The situation is:

I have 6 columns (A, B, C, D, E, F)

A = Ordernumber
B = Contains a value (price) or is BLANK
C = Contains a value (price) or is BLANK
D = Contains a value (price) or is BLANK
E = Contains a value (price) or is BLANK
F = Contains a value (price) or is BLANK

What I want to do in column G is compare all the values and return the lowest value and no BLANK.

Is there anybody who has some tips or who can get this fixed?

Yours faithfully,

BWL
1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@BWL

 

Ok, in Query Editor maybe this is not easy possible.

 

Let go to DAX

 

Use a calculated column: 

Column =
MINX (
    UNION (
        ROW ( "PRICE"; Table1[A] );
        ROW ( "PRICE"; Table1[B] );
        ROW ( "PRICE"; Table1[C] );
        ROW ( "PRICE"; Table1[D] );
        ROW ( "PRICE"; Table1[E] );
        ROW ( "PRICE"; Table1[F] )
    );
    [PRICE]
)

Regards

 

Victor

Lima - Peru




Lima - Peru

View solution in original post

4 REPLIES 4
Vvelarde
Community Champion
Community Champion

@BWL

 

Hi, Could be possible in Query Editor?


Regards

 

Victor




Lima - Peru

@Vvelarde thank for your reply!

I don't know how! The values column B untill F are returned with a RELATED from different Lookup tables.
Thats why I think it cant be done with Query Editor.
Vvelarde
Community Champion
Community Champion

@BWL

 

Ok, in Query Editor maybe this is not easy possible.

 

Let go to DAX

 

Use a calculated column: 

Column =
MINX (
    UNION (
        ROW ( "PRICE"; Table1[A] );
        ROW ( "PRICE"; Table1[B] );
        ROW ( "PRICE"; Table1[C] );
        ROW ( "PRICE"; Table1[D] );
        ROW ( "PRICE"; Table1[E] );
        ROW ( "PRICE"; Table1[F] )
    );
    [PRICE]
)

Regards

 

Victor

Lima - Peru




Lima - Peru

Dear @Vvelarde

 

It's amazing, this works exactly as I need.
Thank you so much for your answer! 🙂

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.