Forum Discussion
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?
- Anonymous2 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 TeamIf 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
- Idrissshatila
Super User
Hello biko1 ,
so in this summary they posted an example of MAXX & MINX formula, you could check it out here https://powerbi.microsoft.com/en-us/blog/power-bi-september-2023-feature-summary/
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Follow me on Linkedin
Vote for my Community Mobile App Idea 💡- biko1New Member
I have already read that and for that reason I feel confused.
- AnonymousNot 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 TeamIf 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