Context transition in DAX explained visually

Поділитися
Вставка
  • Опубліковано 22 лис 2024

КОМЕНТАРІ • 46

  • @Boltage23
    @Boltage23 2 місяці тому +13

    Excellent. This channel probably has the best advanced PowerBI free content on the internet. Moreover, the Italian accent is very funny!
    Greetings from Brazil.

  • @michelfigueredoamieva9549
    @michelfigueredoamieva9549 2 місяці тому +2

    as difficult as it is, your explanation is greatly appreciated. Thanks, Marco, for your dedication to our community.

  • @joaomarcoseliasmatias9156
    @joaomarcoseliasmatias9156 2 місяці тому +8

    This series of visually explainations of contexts in DAX, made a great addition to my knowledge. It seems now that its easier to define which function to use in certain cases. Excellent job, Marco! Thank you

  • @MrMcPeter
    @MrMcPeter Місяць тому +1

    Thank you so much for another great explanatory video Marco. The visual explanation is a huge help understanding why the total average is wrong. I have also struggled with another measure that worked on row level context, but not for the column total, so had to insert an ISINSCOPE for the result variable, as the column total calculation had to be done differently to disregard certain results that was omitted correctly in the row context but not in the total. More videos to help with these situations would be appreciated. Keep up the good work!

  • @MrBadiay
    @MrBadiay 2 місяці тому +1

    I have been stuck the last two days working on this kind of case, you've just solved my next week
    Thanks a lot, really clear and using simple terms (as the shield) makes it even more comprehensive, love it

  • @trinabusto1868
    @trinabusto1868 Місяць тому +1

    ¡Excellent explanation. Thank you for sharing with us your work! I am now reading your book “The Definitive Guide to DAX - 2nd Edition”. This is 24 karat gold.

  • @OM-yn8pt
    @OM-yn8pt 2 місяці тому +3

    Fantastic video, the KEEPFILTERS() before context transition is passed is a concept I just didn't even know about.

  • @zvikabar-kochva3641
    @zvikabar-kochva3641 2 місяці тому +1

    Dear Marco, Thank you for another usuful video. Context transition is indeed one of the most difficlt concepts of DAX, and I had strangled with it for months before I finally got it. One remark for the last Keepfilters example though. The only issue of the DAX measure, which didn't use Keepfilters is the Total row. Therefore, I expected the video to focus on that row and explain what is difference in that row compared with the other rows, which where correctly calculated even without using Keepfilters.
    BTW, using graphical methods to explain DAX concepts will be, in my humble opinion, a great addition to the next revision of "Definitive Guide to DAX" book and perhaps other books SQLBI had previously published.

    • @SQLBI
      @SQLBI  2 місяці тому +2

      Coming (not soon) by end of 2025, indeed!

  • @endar117
    @endar117 2 місяці тому +2

    These visual explanations are so helpful. Thank you very much.

  • @babkenhakobyan6847
    @babkenhakobyan6847 2 місяці тому +2

    As always - excellent, insightful, and easy to understand.

  • @melomaneck
    @melomaneck 18 днів тому +1

    Your earlier videos on DAX were very intimidating...this visual series however is the best on DAX

  • @mazchen
    @mazchen 2 місяці тому +4

    I had no idea that you could define variables inside a function (SUMX) 🤯

  • @Amr-Ibrahim-AI
    @Amr-Ibrahim-AI 2 місяці тому +1

    Always enlightening to watch your detailed explanation Marco.
    One more excellent video.
    Thank you Sir

  • @Nalaka-Wanniarachchi
    @Nalaka-Wanniarachchi 2 місяці тому +1

    Really nice explanation using whiteboard. Love it.

  • @ЕвгенийСкляров-б3ч
    @ЕвгенийСкляров-б3ч 2 місяці тому +2

    And again, great explanation. Thank you very much. Enjoying DAX 😃

  • @marcomori6907
    @marcomori6907 2 місяці тому +1

    The Sales Top Customer Optimized measure is awesome

  • @gurvindersingharora5301
    @gurvindersingharora5301 2 місяці тому +2

    Please upload more Advanced DAX topics videos

  • @johansantacruz6464
    @johansantacruz6464 2 місяці тому +1

    Super clear and detailed explanation as always, many thanks!

  • @lovlyhearts288
    @lovlyhearts288 2 місяці тому +1

    Appreciate for your efforts for making people educate.

  • @tobiracorot6394
    @tobiracorot6394 2 місяці тому +1

    When explaining how the wrong avg number 1002311.71 is calculated, marco show a table at time 22:11. It will be nice to show the measure here of this table.

  • @ProstoSmotrim
    @ProstoSmotrim 2 місяці тому +1

    Excellent job! It would be great if you made the same visual presentation for different measure calculations)

  • @MsHeyMe
    @MsHeyMe 23 дні тому +1

    Thank you for the explanation !! Your videos are great I can finally understand row context and filter context. I am confused however about keepfilters not working with calculate. In your explanation of REMOVEFILTER case, the context transition is triggered first by CALCULATE, but why in the case of KEEPFILTER its triggered by SUMX? I can get my head around it, shouldn't the order of the code execution from the inner function to outer hence CALCULATE first then SUMX like in the case of REMOVEFILTER?

    • @SQLBI
      @SQLBI  16 днів тому

      Check the order of the evaluation in dax.guide/calculate/

  • @HugoVenturini
    @HugoVenturini 2 місяці тому +1

    Essential, Marco! Thank You!!!!!

  • @nehakhanna5893
    @nehakhanna5893 Місяць тому

    Please make some videos regarding how to make complex charts using DAX

  • @mienzillaz
    @mienzillaz 2 місяці тому +1

    Thanks. Greg will be rolling his eyes again when he sees calculate().. again, even tho you have emphasized so many times why you did it 😅

  • @jsmak7617
    @jsmak7617 2 місяці тому +1

    Nice explanation

  • @AdamZuk1982
    @AdamZuk1982 2 місяці тому +1

    Great expleaning, thanks

  • @scramiro1
    @scramiro1 Місяць тому

    Thanks for the video. I don´t get why you suggest that for ignoring context transition we have to use KEEPFILTERS in the first argument rather than using KEEPFILTERS in a Calculate. So, I wonder why the suggested AVERARGEX( KEEPFILTERS(DISTINCT(Date[Month])), [Sales Amount]) would provide a different behaviour to AVERAGEX( DISTINCT(Date[Month]), CALCULATE([Sales Amount],KEEPFILTERS(DISTINCT(Date[Month])). I think in both cases KEEPFILTERS applies an intersection between the row context and filter context, so both scenarios would return the same result?. Thanks.

    • @SQLBI
      @SQLBI  Місяць тому

      No, the latter would not apply KEEPFILTERS to the context transition. Moreover, you didn't write a predicate to the latter syntax, so the result would just keep the filter obtained by the context transition removing the filter coming from the outer filter context - the effect of the filter argument in CALCULATE would be irrelevant because KEEPFILTERS ( DISTINCT ( Month[Month] ) ) is translated into KEEPFILTERS ( DISTINCT ( FILTER ( ALL ( Month[Month] ), Month[Month] = Month[Month] ) ) ), which would return all the months without removing the existing filter.

    • @scramiro1
      @scramiro1 Місяць тому

      Sorry. The formula I provided was not right. I meant this:
      AVERAGEX (
      DISTINCT( 'Date'[Month] )
      ,
      CALCULATE([Sales Amount],KEEPFILTERS( 'Date'[Month] IN {"January","February","November","December"}))
      ).
      I tried this in your pbix file and provides a wrong result. But why? I thought this would keep these 4 months. For instance, when iterating November in the row context, this will intersect with the Filter context (which has 4 months), and thus returning only November. So, at the end, we would only have the two years and the 4 months we want through context transition.
      Also, I tried this other option, which adds the Year.
      AVERAGEX (
      DISTINCT( 'Date'[Month] )
      ,
      CALCULATE([Sales Amount],KEEPFILTERS( ('Date'[Year],'Date'[Month]) IN {(2019,"January"),(2019,"February"),(2018,"November"),(2018,"December")})
      )
      ).
      In this second option, yes it worked. So, in this case, context transition happens and it works. So, what I mean is that we could either use KEEPFILTERS (less code) in the iterator or either use context transition with this second option (don't know why the first option didn't work). However, in the video it only says that we should use KEEPFILTERS in the iterator, it does not mention we could use KEEPFILTERS the way I explaied before.
      Hope this explains better. Again, thanks for your time for the video and repplying comments.

  • @happyvinod3320
    @happyvinod3320 2 місяці тому +1

    Great, Realy it is so educational.

  • @thamilanban
    @thamilanban 2 місяці тому +1

    Thank you

  • @adrianoschwenkberg6773
    @adrianoschwenkberg6773 2 місяці тому +1

    the first who comment a "thank you" for you content

  • @akulchhillar
    @akulchhillar 2 місяці тому

    Is this a re-upload

    • @SQLBI
      @SQLBI  2 місяці тому

      No, this is a new video!

  • @timbrykkk
    @timbrykkk 2 місяці тому +2

    I would love to learn DAX it's just that I hate it so much... Eh, one mm at a time...

    • @SQLBI
      @SQLBI  2 місяці тому +1

      You need to put a little bit of love!

    • @timbrykkk
      @timbrykkk 2 місяці тому

      @@SQLBI Will do! :) ❤

    • @Wzxxx
      @Wzxxx 2 місяці тому

      I hate for 5 yrs

  • @MTawfik86
    @MTawfik86 2 місяці тому +1

    the biggest mistake this channel is doing is stick to ambiguos terms like filters, transition, and contexts , and insist in repeating them

    • @SQLBI
      @SQLBI  2 місяці тому +1

      Please, help us to find alternatives!

    • @TRZMac
      @TRZMac 2 місяці тому +1

      If you are finding it challenging to focus and keep track while hearing these terms over and over again, this might mean that you need to work on the basics more, make sure you understand them pretty well so that you can directly imagine what the word means, and then return to advanced concepts like the Context transition.
      I personally watched the basics videos from SQLBI over 10 times until the idea sticked to my head..

    • @techie2903
      @techie2903 Місяць тому

      @@TRZMac Yes , we need to learn again and again.

    • @mwaltercpa
      @mwaltercpa Місяць тому

      If this video explained each word, it would be four hours. I approach DAX like learning a foreign language. For me to learn properly, I study the grammar as it relates to DAX.