cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
AGo Resolver I
Resolver I

MIN or MAX value of multiple calculated columns

Is there an easy way to create a measure which returns the MIN or MAX value of MULTIPLE calculated columns?

The other way for me could be unpivoting all my calculated columns and apply MIN formula to the unpivoting resulting column. I posted another question to ask how to unpivot multiple calculated columns since I'm able to unpivot only columns of the original datasource in the query editor, but not when I have calculated columns, if it could be useful to someone else...

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft
Microsoft

Re: MIN or MAX value of multiple calculated columns

Hi @AGo,

 

According to your description, you want to get the Max or Min value of MULTIPLE calculated columns, right? Suppose your sample data is like below, and the Max value returned should be 5.

3.PNG

 

If that is the case, you can refer to the below formula:

Measure =
MAX (
    MAX (
        CALCULATE ( MAX ( Table2[Event1] ), ALL ( Table2 ) ),
        CALCULATE ( MAX ( Table2[Event2] ), ALL ( Table2 ) )
    ),
    CALCULATE ( MAX ( Table2[Event3] ), ALL ( Table2 ) )
)

Thanks,
Yuliana Gu

Community Support Team _ Yuliana Gu
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

1 REPLY 1
Microsoft
Microsoft

Re: MIN or MAX value of multiple calculated columns

Hi @AGo,

 

According to your description, you want to get the Max or Min value of MULTIPLE calculated columns, right? Suppose your sample data is like below, and the Max value returned should be 5.

3.PNG

 

If that is the case, you can refer to the below formula:

Measure =
MAX (
    MAX (
        CALCULATE ( MAX ( Table2[Event1] ), ALL ( Table2 ) ),
        CALCULATE ( MAX ( Table2[Event2] ), ALL ( Table2 ) )
    ),
    CALCULATE ( MAX ( Table2[Event3] ), ALL ( Table2 ) )
)

Thanks,
Yuliana Gu

Community Support Team _ Yuliana Gu
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

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ Integration Forum Launch

‘Better Together’ Integration Forum Launch

We've launched a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Top Solution Authors
Top Kudoed Authors