Forum Discussion

biko1's avatar
biko1
New Member
2 years ago
Solved

Update about MAXX & MINX Formula

Hello everyone, 

 

As you know, In september 2023 updates, they mentioned an arrangment about MAXX and MINX. These functions ignore text and Boolean values when there are variants or mixed data types, such as text and numeric. Now with the new optional variant parameter set to TRUE, the functions will consider the text values. 

I tried with some examples but I couldnt do it. Could you share an example for this? 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi biko1 ,

    I've created a demo file that mimics the instructions in the update summary to hopefully help with understanding.
    The original table looks like this:

    Let's create a measure that returns a value of the corresponding data type according to [Data Type].

    Then we create another measure:


    The full measure code actually looks like this:

    MINX 1 = MINX('Table',[Variant Measure],FALSE)

    MINX and MAXX without the variant parameter set, or set to FALSE, will ignore text and Boolean data types.
    This is the reason why Boolean rows and Text rows have no results returned when they clearly have values.

    Next we change the third parameter to TRUE:

    MINX and MAXX with the variant parameter set to TRUE will now include text values. Boolean values are still ignored.

    Please check the attachment.

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

3 Replies

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi biko1 ,

        I've created a demo file that mimics the instructions in the update summary to hopefully help with understanding.
        The original table looks like this:

        Let's create a measure that returns a value of the corresponding data type according to [Data Type].

        Then we create another measure:


        The full measure code actually looks like this:

        MINX 1 = MINX('Table',[Variant Measure],FALSE)

        MINX and MAXX without the variant parameter set, or set to FALSE, will ignore text and Boolean data types.
        This is the reason why Boolean rows and Text rows have no results returned when they clearly have values.

        Next we change the third parameter to TRUE:

        MINX and MAXX with the variant parameter set to TRUE will now include text values. Boolean values are still ignored.

        Please check the attachment.

        Best Regards,
        Gao

        Community Support Team

         

        If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
        If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

        How to get your questions answered quickly --  How to provide sample data in the Power BI Forum