DAX for Power BI - MAX of Multiple Columns or Measures

Поделиться
HTML-код
  • Опубликовано: 31 окт 2024

Комментарии • 42

  • @MiggidyMcMac
    @MiggidyMcMac 5 лет назад +2

    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!

    • @BIElite
      @BIElite  5 лет назад

      Great to hear Malcolm!

  • @derekbyers4373
    @derekbyers4373 4 года назад +3

    Awesome solution - I had to get the Max of 4 dates and thanks to this solution I managed to achieve that - Thank you

    • @BIElite
      @BIElite  4 года назад

      Glad to hear, Derek! This trick remains my favorite of all that I've posted on the channel.

  • @akhilannan
    @akhilannan 5 лет назад +1

    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
      @BIElite  5 лет назад

      I saw this as the original solution but it got messy!

    • @akhilannan
      @akhilannan 5 лет назад

      @@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.

    • @jasperjeensma396
      @jasperjeensma396 5 лет назад

      @@BIElite and you are limited to comparing only two with MAX. Thanks for the vid.

    • @BIElite
      @BIElite  5 лет назад +1

      @@jasperjeensma396 Hey Jasper, you can compare as many measures/columns as you want following the technique in this video.

  • @Knagy88
    @Knagy88 4 года назад +2

    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.

  • @heatherdaoust6140
    @heatherdaoust6140 4 года назад +1

    If you add another column to the variable table, say CATEGORY, can you return the value in CATEGORY instead of the total maxx value?

  • @Devon_Dan_Sailing
    @Devon_Dan_Sailing 4 года назад +1

    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?

  • @LeahFinger
    @LeahFinger Год назад

    Thanks! Is there a way to display the column name that corresponds with the max value?

  • @ericlandry3971
    @ericlandry3971 3 года назад

    Hi! Great Video! Can something like this be done to find the max of a moving average? Thanks

  • @ArushiChaudhary-lk8st
    @ArushiChaudhary-lk8st Год назад

    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.

  • @Oscarrudnas
    @Oscarrudnas 4 года назад

    Is that possible if you have column values as well? If you also had different countries to group by for example.

  • @LS8636
    @LS8636 2 месяца назад

    This is awesome

  • @nonnunned
    @nonnunned 2 года назад

    I adapt to MINX but they exclude zero value, please help ( if 5,0,9 --> 5 it should 0 not 5)

  • @adam_k1992
    @adam_k1992 5 лет назад +1

    This is great, many thanks!

    • @BIElite
      @BIElite  5 лет назад

      Thanks for watching, Adam!

  • @asadrauf7111
    @asadrauf7111 5 лет назад

    Awesome video man!

  • @myazigi
    @myazigi 5 лет назад +1

    Cool one Parker, thanks!!!!

    • @BIElite
      @BIElite  5 лет назад

      Thanks you Mauricio! Didn't see this one

  • @johncarlovillalobos5021
    @johncarlovillalobos5021 4 года назад +1

    Hi, Thank you so much for this!!

  • @Bharath_PBI
    @Bharath_PBI 4 года назад +1

    Cool trick 👍

  • @jeffalex
    @jeffalex 2 года назад

    yessss thank you!

  • @pratikfutane8131
    @pratikfutane8131 5 лет назад +1

    This is great!!

    • @BIElite
      @BIElite  5 лет назад +1

      Thanks Pratik!!

  • @sherryizzie5309
    @sherryizzie5309 5 лет назад

    Very cool trick!!

    • @BIElite
      @BIElite  5 лет назад

      Thanks Sherry!

  • @johnmatta9577
    @johnmatta9577 5 лет назад

    Parker, why MaxX and not just Max?

    • @BIElite
      @BIElite  5 лет назад +1

      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.

    • @johnmatta9577
      @johnmatta9577 5 лет назад

      @@BIElite thanks Parker

  • @icanthearkinda9399
    @icanthearkinda9399 3 года назад

    Bruhhhhhhhhhhhh....this is BA!!!

  • @tedvedia9436
    @tedvedia9436 5 лет назад +1

    Nice

    • @BIElite
      @BIElite  5 лет назад

      Thanks Teodoro!

  • @ayflying2145
    @ayflying2145 5 лет назад

    Perfect

    • @BIElite
      @BIElite  4 года назад

      I like this technique too 😊