#4 DAX Fridays! 101: What is Context transition in DAX?

Sdílet
Vložit
  • čas přidán 26. 06. 2024
  • You heard it before right? Context transition, but what is it? In this video I explains the basics, and .... it is easier that what you think!! Yey!!
    Here you can download all the pbix files: curbal.com/donwload-center
    SUBSCRIBE to learn more about Power and Excel BI!
    / @curbalen
    Our PLAYLISTS:
    - Join our DAX Fridays! Series: goo.gl/FtUWUX
    - Power BI dashboards for beginners: goo.gl/9YzyDP
    - Power BI Tips & Tricks: goo.gl/H6kUbP
    - Power Bi and Google Analytics: goo.gl/ZNsY8l
    ☼☼☼☼☼☼☼☼☼☼
    POWER BI COURSES:
    Want to learn Power BI? How about you take one of our courses? Here you can find the available courses:
    curbal.com/courses-overview
    ☼☼☼☼☼☼☼☼☼☼
    ABOUT CURBAL:
    Website: www.curbal.com
    Contact us: www.curbal.com/contact
    ▼▼▼▼▼▼▼▼▼▼
    If you feel that any of the videos, downloads, blog posts that I have created have been useful to you and you want to help me keep on going, here you can do a small donation to support my work and keep the channel running:
    curbal.com/product/sponsor-me
    Many thanks in advance!
    ▲▲▲▲▲▲▲▲▲▲
    ************
    ************
    QUESTIONS? COMMENTS? SUGGESTIONS? You’ll find me here:
    Linkedin ► goo.gl/3VW6Ky
    Twitter ► @curbalen, @ruthpozuelo
    Facebook ► goo.gl/bME2sB
    #CURBAL #SUBSCRIBE

Komentáře • 108

  • @wfromero
    @wfromero Před 4 lety +22

    None of the various videos explaining context transition, even from SQLBI, had so much assertiveness in demystifying the context transition in DAX.
    This is the million dollar video.
    Thank you.

  • @brunof.s.8186
    @brunof.s.8186 Před 4 lety +8

    oh my god, context transitions are my personal demons in learning dax.... must face it now! thank you Ruth!

    • @CurbalEN
      @CurbalEN  Před 4 lety +1

      Will do more on the topic soon :)
      /Ruth

  • @dmytroandriychenko4714
    @dmytroandriychenko4714 Před 2 lety +3

    The easiest and the best explanation of context transition I have seen so far!!! Brilliant work, Ruth, please keep it up, you are awesome!

  • @ravishmahajan9314
    @ravishmahajan9314 Před 2 lety

    Do you know you are the best teacher on PowerBI on CZcams?
    No you don't know.

    • @CurbalEN
      @CurbalEN  Před 2 lety

      And you are awesome ☺️

  • @supersayan9888
    @supersayan9888 Před 2 lety +2

    Your my Hero Ruth!
    I went from SQLBI Mastering DAX course to your video to understand context transition. A milion dollar video indeed.
    Gracias!

    • @Aussiepeoplestats
      @Aussiepeoplestats Před rokem +1

      SQLBI is a great course but even they haven't been able to dumb down why SUM ignores the row context. This video is the only resource that breaks it down in an easy to understand manner.

  • @laurenceabrahams3996
    @laurenceabrahams3996 Před rokem

    The best explanation I heard so far , Thank you (PBI Trainer) 👏

  • @t.g.399
    @t.g.399 Před 11 měsíci

    Your teaching method is the easiest to understand by far. Thank you🎉

  • @gonzalofuste
    @gonzalofuste Před 6 měsíci

    coincido con muchos comentarios; explica de forma facil y se entiende a la primera incluso de forma mas clara que otros canales con mas "renombre". Enhorabuena.

  • @marcoantoniobajanabarahona3300

    I love you Ruth how you explain such a complex concept in something so easy in 5 minutes. Excellent video

  • @bradj229
    @bradj229 Před 4 lety +1

    Your videos are always great! Very informative and easy to understand. However, your transparency of where you stumbled when originally learning what you're now teaching is my favorite part and why I like your content more than anyone else's! It reminds me that tripping up is part of the learning process. Keep up the wonderful work!

    • @CurbalEN
      @CurbalEN  Před 4 lety +1

      It sounds like we have similar learning styles!! ;)
      /Ruth

  • @kumanan4u
    @kumanan4u Před 4 lety +2

    The best explanation for context transition. You nailed it

  • @alt-enter237
    @alt-enter237 Před rokem

    Nice job! I am searching for ways to explain row to filter context transition and this is the simplest, most elegant explanation thus far!

  • @square007tube
    @square007tube Před 4 lety +1

    This is Awesome DAX video, simple and informative. Well done Ruth!

  • @marilenadonofrio9787
    @marilenadonofrio9787 Před 2 lety

    Bravissima Ruth! 👏👏👏👏👏

  • @benhalicki9749
    @benhalicki9749 Před 2 lety

    Great explanation! DAX does my head in...

  • @AbhijeetVishal
    @AbhijeetVishal Před 4 lety

    Thanks Ruth, have read so many articles about context transition, but nowhere it has been explained so well 😊

  • @jandersonaraujo7796
    @jandersonaraujo7796 Před 4 lety +1

    The best explanation about context transition ever!

  • @alinasamburska867
    @alinasamburska867 Před 3 lety

    Thank you soooo much! You gave an easy explanation of such a difficult-to-understand concept.

  • @RobertoStaltari
    @RobertoStaltari Před 4 lety

    Nice and clean way to explain context transiction. Thanks Ruth

    • @CurbalEN
      @CurbalEN  Před 4 lety

      Thanks 2 u and happy friday!
      /Ruth

  • @dicky4780
    @dicky4780 Před 4 lety +1

    Thank you DAX just made more sense than it did 5 minutes ago before wathcing your video

  • @MichaelBrown-lw9kz
    @MichaelBrown-lw9kz Před 3 lety

    This is an excellent explanation. It is tricky explaining how the CALCULATE function creates a filter context.

  • @powerbinareal
    @powerbinareal Před 4 lety +1

    Sempre top e direto!

  • @tlee7028
    @tlee7028 Před 2 lety

    Da Best CT tutorial ! Thank you 😊

  • @AyowumiOgunjobi
    @AyowumiOgunjobi Před 2 lety

    You gave an easy to understand explanation to a difficult concept. Thanks a lot.

  • @tipums123
    @tipums123 Před 4 lety

    Thank you for explaining.

  • @svenkatjkn
    @svenkatjkn Před 4 lety

    Awesome explanation!

  • @solarson_studio
    @solarson_studio Před 4 lety

    Thanks Ruth! This is a great example to make sense context transition! I am learning this concept from SQLBI as well, actually a measure already had a hidden calculate()there. If you can have another video in the future to talk about context transition pros & cons, and it should be wonderful. I learned context transition cannot work well when we have duplicates, but I still want to understand deeply on that.

  • @GrandizerIntali9
    @GrandizerIntali9 Před 4 lety

    Thanks for the tip !

  • @bravucod
    @bravucod Před 4 lety

    Thanks, Ruth that is extremely useful

    • @bravucod
      @bravucod Před 4 lety

      Any books that you recommend that will provide a good foundation? Thanks

  • @LA-sw1gv
    @LA-sw1gv Před 8 měsíci

    fun and objective. thank you

  • @Unbox747
    @Unbox747 Před 3 lety

    Thanks again!

  • @marioestrada2233
    @marioestrada2233 Před 3 lety

    Great example!

  • @gxsoft
    @gxsoft Před 4 lety +1

    Nice explanation of CALCULATE() and context filter, thanks

  • @Phoenixspin
    @Phoenixspin Před 2 lety

    Calculate gave Sum a helping hand. We should learn from this. Let's help our fellow human beings.

  • @mahikakhare
    @mahikakhare Před 4 lety

    Wow.. didn't knew this👍👍

  • @samuelmanseau6905
    @samuelmanseau6905 Před 4 lety

    Congratulations (recommanded by Guy in a Cube!) et Merci Beaucoup for that clear explanation !

  • @rizkyramdhany4549
    @rizkyramdhany4549 Před rokem

    Thanks!!

  • @sanjeevsoni6793
    @sanjeevsoni6793 Před 3 lety

    Great!!

  • @kahhengyeong7947
    @kahhengyeong7947 Před 4 lety

    Oh my god, I've been using PBI for years already and yet I didn't know about this! And I sometimes still get mixed up with SUM and SUMX because many times they give the same result. Very appreciate these info as it's good to go back to basics :)

    • @CurbalEN
      @CurbalEN  Před 4 lety +1

      Will continue with this series :)
      /Ruth

    • @kahhengyeong7947
      @kahhengyeong7947 Před 4 lety

      Cool! And probably would be good to know if CALCULATE(SUM) is actually the same as SUMX?

  • @kaistasch4028
    @kaistasch4028 Před 2 lety

    Thank you very much. I watched several videos and I did not get it until now.

  • @shyamthakur9799
    @shyamthakur9799 Před 4 lety +2

    Hi,
    Your video's are very helpful...
    Can you make vdo's on Azure with power bi..✌️

    • @CurbalEN
      @CurbalEN  Před 4 lety +1

      Anything in particular you would like to see?
      /Ruth

    • @shyamthakur9799
      @shyamthakur9799 Před 4 lety +1

      @@CurbalEN The way you explain most of things...it makes so easy to understand.
      So may be you can make vdo's for BI guys using Azure world for there reporting purposes....if possible then you can make vdo's on following flow ( Multiple source data upload in azure > consolidation in azure > transformation in azure > uploading in azure Analysis service > power bi > uploading in cloud > sharing )

  • @adammachonko7090
    @adammachonko7090 Před rokem

    Awesome

  • @pabeader1941
    @pabeader1941 Před 4 lety +2

    But how does it know that Product is the filter for Calculate? Isn't Discount just as usable as a filter for Calculate?

  • @asideofrice
    @asideofrice Před 4 lety

    Another great thing to go over would be why certain calculations completely remove the context in a matrix. Example add + 0 to your measure for the purpose of dividing and getting 0 instead of blank. (There may be a better way, perhaps ISBlank to differentiate)

  • @manofhat676
    @manofhat676 Před 2 lety

    Thanks

  • @FalconFlyer75
    @FalconFlyer75 Před 3 lety

    question, would the sum be caused by the product name or the discount amount? wouldn't it be the discount amount?
    also great Job on this, I'm taking SQLBI but really struggling (I made it as far as context transition and was on the verge of giving up) I'm glad I found your videos this makes more sense

  • @minurapunchihewa4592
    @minurapunchihewa4592 Před 3 lety +1

    Hi Ruth,
    Amazing video, I just wanted to make a small clarification.
    This article on sqlbi actually presents the opposite argument, from what I have gathered. According CALCULATE introduces filter context to calculations, not row context,
    www.sqlbi.com/articles/understanding-context-transition/
    I am just a little confused. Could you tell please clear this up for me?

  • @Wzxxx
    @Wzxxx Před 2 lety

    Thx. I was going crazy trying to understand what is going on.

    • @CurbalEN
      @CurbalEN  Před 2 lety

      Yeah, we all have been there, it gets better I promise!!

  • @Phoenixspin
    @Phoenixspin Před 4 lety

    So simple, yet so complex.

    • @CurbalEN
      @CurbalEN  Před 4 lety

      And that is why we love it, isnt it?
      /Ruth

  • @MrRohanroxx1
    @MrRohanroxx1 Před 2 lety

    Why do switch statements or if give correct results in calculated columns then ?

  • @DanW0416
    @DanW0416 Před 4 lety

    Thanks. Very good explanation. You might want to add a duplicate row to the table and show what happens then as I believe that also will produce unexpected results, correct?

    • @CurbalEN
      @CurbalEN  Před 4 lety

      Will do on next video ;)
      /Ruth

  • @powerbinareal
    @powerbinareal Před 4 lety +1

    Vou add vc no netflix

  • @1yyymmmddd
    @1yyymmmddd Před 2 lety

    What if you have two similar rows? For example in your example if you have 4 rows instead of 3 4th row being exactly the same as the 3rd row? Would "Sum as CC" give you 500 twice (for row 3 and 4) ?

  • @bc67
    @bc67 Před 4 lety

    I like this topic! Can you explain why measures DO see the rows as filters? :) I've read that we use measures when we want to aggregate values from many rows in a table, but I'm confused by that. I view "aggregate" as being synonymous with "Sum." So based on that description, I'd expect to see the result that the calculated column in your example produced.

    • @reed311
      @reed311 Před 2 lety

      Measures are always surrounded by an implicit Calculate. It wasn’t discussed in this video but really needs to be talked about to get the entire picture.

  • @HarshNathani
    @HarshNathani Před 4 lety

    Hi Ruth,
    Thanks for the video.
    Just a quick know how question.
    If measures and calculate columns with Calculate both do a context transition. Why do we prefer measures over Calculated Columns ?? Is it memory space ?

    • @CurbalEN
      @CurbalEN  Před 4 lety

      Check this video out:
      m.czcams.com/video/SmXLgEHXSGc/video.html&vl=en
      /Ruth

  • @christianstork1049
    @christianstork1049 Před 4 lety

    Wouldn't this be the time to introduce row context v filter context, i.e., that context transition means the transition from row to filter context?

  • @adan8657
    @adan8657 Před 3 lety

    Tengo que comentar esto:
    Después de tantas horas de aprendizaje de Dax, después de cientos de [products names] pasando ante mis ojos, ver el queso de cabrales en una matriz de Power BI me ha hecho feliz.🥰

    • @CurbalEN
      @CurbalEN  Před 3 lety

      A mi me paso lo mismo 😍😍

  • @YazanWael
    @YazanWael Před 4 lety

    I think this is confusing. As you said, CALCULATE will return the value per row not per column. But it doesn't look at any value in any other column to use it as a filter. So what you've said in the end @5:48 is not really accurate.
    For example, if we add another row that has "Konbu" sale of 700, it will not affect "Sum as CC" in the existing "Konbu" row.

  • @hnp250
    @hnp250 Před 4 lety

    Could you please do a video explaining the Table Expansion technique? Thank you in advance!!

    • @CurbalEN
      @CurbalEN  Před 4 lety

      I dont know what that is?
      /Ruth

  • @vishaljhaveri7565
    @vishaljhaveri7565 Před rokem

    At 5:53, Calculate Sum where Product = "Queso Cabrales".
    Why not Calculate Sum where Discount=10??
    I mean on basis of which column it is calculating the value?

  • @arklur3193
    @arklur3193 Před 4 lety

    Another thing would have been interesting to show here, writing this when adding a new column to the table: Sum as CC2 = [Sum as measure]. The result might not be what you expect!

    • @CurbalEN
      @CurbalEN  Před 4 lety

      Will talk about it in another video!
      /Ruth

  • @bi2thelly
    @bi2thelly Před 4 lety

    Why did it choose products field? If they were not unique records would it still be the same?

    • @CurbalEN
      @CurbalEN  Před 4 lety

      Will talk about it on another video :)
      /Ruth

  • @monmorelord6368
    @monmorelord6368 Před rokem

    is this not that a measure takes on the filter context in a visual while a column measure does not ??? checxk with otehr functions on a column and then put inside calculate ?

  • @seven7189
    @seven7189 Před 4 lety

    Noob question: so is the calculate function used in a measure just overkill?

    • @jtmh31
      @jtmh31 Před 4 lety

      If a measure you're using in a visual, it's insanely powerful. Think of it like a supercharged SUMIFS, though it can be used for count, min, max, average, rank and more.
      I don't understand why you would use a calculate here.

  • @sandip_bettereveryday
    @sandip_bettereveryday Před 4 lety

    How can 'Context Transition' feature be used effectively somewhere else (in measures) and not in Calculated Columns?

    • @CurbalEN
      @CurbalEN  Před 4 lety

      I dont know, so many variables that matter...

  • @luisalejandrorodriguezcamp9516

    I love your video, it's very cool and simple to understand. However, I think you are missing something (or I missed it from your explanation). Calculate does not take any particular columns as context filters, but takes all previous columns. This is very weird, and I learned it the painful way, when trying to add two calculated columns with very similar sintax and getting a circular reference error... maybe for another dax friday...

  • @DanielTavares29
    @DanielTavares29 Před 3 lety

    Practice, practice, practice hehehe

    • @CurbalEN
      @CurbalEN  Před 3 lety

      Yep, that is the only way!

  • @sbn4862
    @sbn4862 Před 2 lety

    I don’t understand what you say at all

    • @CurbalEN
      @CurbalEN  Před 2 lety +1

      That is a common DAX problem :(

  • @sourabhpatel3834
    @sourabhpatel3834 Před 9 měsíci

    I am calculating Total sales in two ways but it is providing wrong results
    First way :
    Total sales =
    var sale = SUMX(
    order_details,
    order_details[unitPrice] * order_details[quantity])
    var discount = SUMX(
    order_details,
    order_details[discount] * order_details[unitPrice] * order_details[quantity] )
    return sale-discount
    __________________________________________________________________________________________________
    and the second way ( i am using sale variable):
    Total sales =
    var sale = SUMX(
    order_details,
    order_details[unitPrice] * order_details[quantity])
    var discount = SUMX(
    order_details,
    order_details[discount] * sale )
    return sale-discount
    this two must provide same result ?