This is exactly the solution I was looking for to avoid nested Ifs and cascading min/maxs... I had 8 columns to compare with some nesting logic (max of this, min of that, max of the combined) ... this solution got me there with readable code. Thank you!
Nice trick. Another approach would be to Cascade Max function . Max([Measure 1], [Measure 2]) would give highest of 2 measures. The result can be Max checked against next measure and so on.
@@BIElite You are right. More measures you have more messy it gets :) To some extend you can control the mess by splitting each Max operation into separate variables.
What if I want to add a column in each Union row that is the name of the measure. And I want to return that name of the measure that is the max of the group. How do I do that? Basically I want an indicator that says what the max measure.
Good question. When you create a virtual table, the only way to reference the virtual column is if you use an iterative function. Therefore you can only interact with the virtual column but using an X function, FILTER, or something similar.
This is exactly the solution I was looking for to avoid nested Ifs and cascading min/maxs... I had 8 columns to compare with some nesting logic (max of this, min of that, max of the combined) ... this solution got me there with readable code. Thank you!
Great to hear Malcolm!
Awesome solution - I had to get the Max of 4 dates and thanks to this solution I managed to achieve that - Thank you
Glad to hear, Derek! This trick remains my favorite of all that I've posted on the channel.
Nice trick. Another approach would be to Cascade Max function . Max([Measure 1], [Measure 2]) would give highest of 2 measures. The result can be Max checked against next measure and so on.
I saw this as the original solution but it got messy!
@@BIElite You are right. More measures you have more messy it gets :) To some extend you can control the mess by splitting each Max operation into separate variables.
@@BIElite and you are limited to comparing only two with MAX. Thanks for the vid.
@@jasperjeensma396 Hey Jasper, you can compare as many measures/columns as you want following the technique in this video.
What if I want to add a column in each Union row that is the name of the measure. And I want to return that name of the measure that is the max of the group. How do I do that? Basically I want an indicator that says what the max measure.
If you add another column to the variable table, say CATEGORY, can you return the value in CATEGORY instead of the total maxx value?
This is a great solution but I also want to be able to return the measure name that corresponds to that highest value. Is this possible?
Thanks! Is there a way to display the column name that corresponds with the max value?
Hi! Great Video! Can something like this be done to find the max of a moving average? Thanks
Hi I have a query Say if this is a clustered column chart and the bifurcations are created through legends then how ca we find Highest Value.
Is that possible if you have column values as well? If you also had different countries to group by for example.
This is awesome
I adapt to MINX but they exclude zero value, please help ( if 5,0,9 --> 5 it should 0 not 5)
This is great, many thanks!
Thanks for watching, Adam!
Awesome video man!
Cool one Parker, thanks!!!!
Thanks you Mauricio! Didn't see this one
Hi, Thank you so much for this!!
No problem!
Cool trick 👍
Thanks!
yessss thank you!
This is great!!
Thanks Pratik!!
Very cool trick!!
Thanks Sherry!
Parker, why MaxX and not just Max?
Good question. When you create a virtual table, the only way to reference the virtual column is if you use an iterative function. Therefore you can only interact with the virtual column but using an X function, FILTER, or something similar.
@@BIElite thanks Parker
Bruhhhhhhhhhhhh....this is BA!!!
Nice
Thanks Teodoro!
Perfect
I like this technique too 😊