7 reasons DAX is not easy

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 พ.ย. 2024

ความคิดเห็น • 95

  • @Mucahtkutlu
    @Mucahtkutlu ปีที่แล้ว +22

    I wrote a lot of DAX last four years, but I still come here and listen to Alberto whenever I struggle. If you work as a Power BI developer, you will have sleepless nights 😢 Like I do now. On my weekend, I am still trying to solve something that has become my nightmare. The worst part, there will be no one to help you because your case will always be too specific. However, after you solve the issue, you will find a better way, but it will be too late.

    • @supersql8406
      @supersql8406 ปีที่แล้ว +2

      I rem jumping into a contract position and was pushed into Power BI, thought it would be similar to Tableau until I had to deal with DAX; and at the time I didn't quite understand (such concepts as...) why we need to used sum over sumx even though I understood the definition. Like you said it was a nightmare... but I'm glad I went thru it and will help me to prepare myself if I ever had to do it again. And yeah this guy in the video breaks it down really well!

  • @sebbean881
    @sebbean881 3 ปีที่แล้ว +7

    Every time I watch a Video of SQLBI I feel like a living example of the Dunning Kruger effect...
    Thank you for your Videos, they are a dwell of wisdom for me!

  • @egorshiyanov1206
    @egorshiyanov1206 3 ปีที่แล้ว +14

    Alberto, this video was really helpful and encouraging! Thank you so much!
    Sometimes I even think that I don’t know why the number is slow or incorrect but when I follow your advice “Slow down, take a deep breath, maybe a cup of coffee and write down the filter context and follow it through your code” the solution hits me in the head. And I’m like “Aha! That is it!”
    Thank you again! You are awesome!

  • @rick_.
    @rick_. 3 ปีที่แล้ว +17

    Thank you for this! I found that the addition of variables made a HUGE difference in making DAX easier.

  • @adan8657
    @adan8657 3 ปีที่แล้ว +31

    If DAX was easy, then Alberto would be really boring 😁

  • @qiancasper
    @qiancasper 3 ปีที่แล้ว +4

    I met Dax a year back and I fully agree with your point and I started to follow your channel abt half year ago.Dax just like girl friend sometimes makes you smile and cry thanks for elaborate the Dax from fundamental level to help me gain the knowledge day after day

  • @tommyhao7699
    @tommyhao7699 3 ปีที่แล้ว +11

    Hi Alberto, thanks very much for your video. I agree with your point that DAX is not an easy language. I started studying DAX in 2019. I read the 1st edition of The Definitive Guide to Dax and Dax Patterns, which I couldn't get any points. Then I started reading the second edition of the books along with the video training. Still, some concepts I was struggling with, such as the way of CALCULATE working. Some of the formulas were working like magic; however, I didn't know the reason why. The reason why I didn't grasp DAX well, in my mind, was TRIAL AND ERROR. I didn't get the point of the four pillars, Evaluation Context, Iterator, Context Transition and Expandaned Table very well. When the formula didn't work, I tried to add CALCULATE between codes without reasoning the code. When I read the second edition 5 times, I started understanding the foundations of DAX and the logic behind it. Now it's the six times I read the book. Wish you and Marco all the best:)

    • @juanlauroaguirre5646
      @juanlauroaguirre5646 2 ปีที่แล้ว

      Wow Tommy you made my day! Thanks for your comments I relate much with!

  • @massimocolaceci
    @massimocolaceci 3 ปีที่แล้ว +6

    This video, as the others by Alberto and Marco, sheds a light on such a fascinating language. I'd say an "ACADEMIC light", because your teaching approach reminds of the best times of Computer Science Bachelor I lived in late 90s, at "Università La Sapienza" in Rome. Pure gold. I stick to your channel.

  • @vilmarsantos3419
    @vilmarsantos3419 3 ปีที่แล้ว +11

    Este vídeo não só uma aula sobre DAX, é também uma lição de vida.

  • @saharlatifi3510
    @saharlatifi3510 2 ปีที่แล้ว +3

    Hi Alberto, thanks for this video. It's very encouraging. I have started learning DAX by watching TH-cam videos 2 months ago, but soon I realized that it did not work. Currently I'm reading your book "The Definitive Guide to Dax and Dax Patterns" and I read some parts 2-3 times. I love the way you explain the fundamentals. Thank you so much.

  • @sergio_molinari
    @sergio_molinari 2 ปีที่แล้ว +2

    Alberto, Complimenti, sei una risorsa Impressionante!
    Grazie per quello che condividi e per come lo fai.

  • @sukoi2113
    @sukoi2113 3 ปีที่แล้ว +1

    You guys always have been a landmark to get out of any DAX situation.

  • @chadweber1582
    @chadweber1582 2 ปีที่แล้ว +1

    Alberto is so passionate about DAX! He inspires me to keep learning!

  • @Mekinhumbel
    @Mekinhumbel 2 ปีที่แล้ว +2

    So glad I happened on this--needed to hear this today. I found a bad course on Udemy (not going to call anyone out here), and got very frustrated and discouraged that I couldn't apply any of it in my work. Then found the 2nd edition of the "Definitive Guide..." and I'm starting to get a sense how powerful it is, and for the same reason, why it's so hard to debug, and so easy to get wrong answers without knowing why. Also (best of all) that I'm not stupid, I just had bad teachers until now lol. :) Thanks for what you guys do. You make us cube farmers look good 💪.

    • @SQLBI
      @SQLBI  2 ปีที่แล้ว

      Hey, "cube farmers" is a nice definition! Thanks!!

  • @spilledgraphics
    @spilledgraphics 3 ปีที่แล้ว +11

    Wise words:
    Alberto: Practice the fundamentals.
    Alberto: Practice the fundamentals.
    Alberto: "Did I said that?" -- > Practice the fundamentals.
    😅👌

  • @mwaltercpa
    @mwaltercpa 2 ปีที่แล้ว +1

    Love the chair example! Always something to gain in continually learning DAX. For me DAX is not easy due having to learn it as both a functional and query language.. add to that two contexts to juggle. You’re right understanding theory and practice is the only way. Two things that helped me.. learn on practice mini models that you control, and variables are your friend in building a solution.

  • @franciscoherrera1990
    @franciscoherrera1990 3 ปีที่แล้ว +3

    I really think you both guys are the most intelligent living humans on earth. Thank you very much for your advice and your videos and courses, this video is very helpful, a masterpiece video!

  • @markushermes9153
    @markushermes9153 ปีที่แล้ว +1

    Brilliant explanation, Alberto, -pure Brilliance ! Thanks !

  • @thiyagua6553
    @thiyagua6553 3 ปีที่แล้ว +1

    Thanks to DAX to introduce Alberto and Marco... Great mentors...

  • @paravej
    @paravej 5 หลายเดือนก่อน +1

    16:30 to 16:40 is the best statement of the entire video ❤❤

  • @BolajiBI
    @BolajiBI 3 ปีที่แล้ว +1

    Every person learning DAX needs to watch this!

  • @drivetrainerYT
    @drivetrainerYT 3 ปีที่แล้ว +3

    Thanks, really important lesson that many woud rather dismiss, as you rightfully say. Having been myself from the basic, to C, to assembler, to PL, Pascal, to various dbms, like Clipper, -- Dax is the first language that invokes a strong association with the Hesse's Das Glassperlenspiel-- The Glassbeads Game. Like some complex, but beautiful music, notwithstanding it's seemingly simple "words"

  • @yoray_s
    @yoray_s 3 ปีที่แล้ว +10

    Thanks Alberto. But another huge reason it's still hard is lack of effective and EFFICIENT debugging tool that will expose critical details regarding errors and mistakes. No matters the language, no programming language in 2021 is suppose to feel like trying to solve a rubik's cube. Of course once you understand the concept of solving the cube it's easy and of course you do want eventually to master it and reduce your dependency on debuggers. The question is how hard would it be to get to that point. The harder the challenge is the less people will be able to pass it. Unfortunately DAX is both hard and without a debugger tool - this increases the chance that more people will not be able to pass the challenge. In a result they will waste time, energy and in some cases money in a try to get there. If you ask me, without debugger capabilities it's 99% harder to master DAX.
    The question is why nobody develops a convenient tool? Let's start with the simple stuff:
    - What is the function's execution order?
    - What is the type of data a function expecting to receive? (table, column, scalar etc...)
    - What is the input/output data type a function gets/returns? (table, column, scalar etc...)
    - What is the input/output data a function gets/returns?
    Giving the fact that DAX is a functions languages - a strictly separated functions executions that simply calling each other.. Is this so hard for someone who knows the language's in-depth engine to put a break or some sort of a component between each execution that will read and output this kind of information?

    • @SQLBI
      @SQLBI  3 ปีที่แล้ว +6

      We totally agree a debugger would be useful. What is complex is to think how to implement a debugger when a measure can be executed many times and in different context. A debugger based on Power BI visuals could be challenging, a debugger using a custom matrix to display the result could be more feasible.
      It's not easy to solve.
      One approach is to modify your code: www.sqlbi.com/tv/how-to-debug-a-dax-measure/
      Another approach is to modify the query executed: thebipower.fr/index.php/2021/04/05/dax-debugger/
      None of these techniques is perfect and a "true" debugger is far, at the moment. As of today, Tabular Editor 3 is the tool that more likely could have a debugger, because it already has a full parser that could cover several of the questions you made.

    • @mauriciovillatoro9361
      @mauriciovillatoro9361 9 หลายเดือนก่อน

      100% agree with you yoray

    • @mauriciovillatoro9361
      @mauriciovillatoro9361 9 หลายเดือนก่อน

      ​@SQLBI unfortunately it cost $100 monthly per user.

  • @ozansen_ozibaba
    @ozansen_ozibaba 3 ปีที่แล้ว +1

    Thanks, Maestro Alberto . Your suggestions are priceless. I was afraid that you would forget saying "Enjoy DAX" in the end.

  • @FernandoSpalterMoretto
    @FernandoSpalterMoretto 3 ปีที่แล้ว +2

    I'd say that mastering the fundamentals is the way to go in anything you want to get better at. DAX of course is not different, but I do agree that it is a teacher more cruel than average

  • @vietndk5437
    @vietndk5437 2 ปีที่แล้ว +1

    you're always awesome when making tutorial video. Thanks in advance, Albert

  • @earlnoli
    @earlnoli 2 ปีที่แล้ว +3

    DAX is not hard... it is hell :D
    having done C#, SQL, Python, R, even MDX... DAX is a strage beast. Thank you for the video. help alot.
    GWBASIC.. that is my first language. :)

    • @SQLBI
      @SQLBI  2 ปีที่แล้ว

      DAX has unique concepts different from other programming and query languages. Once you know them, it's not a paradise, but definitely not hell! :)

  • @yekhtiari
    @yekhtiari 3 ปีที่แล้ว +2

    Very informative. I really like the idea of focusing on fundamentals and not memorizing syntaxes. Thanks for this inspiring video.

  • @Charlie888
    @Charlie888 3 ปีที่แล้ว +1

    Thanks, Alberto, All those answers make a lot sense.😊

  • @virginiacosta2798
    @virginiacosta2798 3 ปีที่แล้ว +2

    Great, Alberto! Opened my mind. Thank you!

  • @ed2672
    @ed2672 ปีที่แล้ว +2

    appreciate your sharing. this is super useful!

  • @mau_lopez
    @mau_lopez 3 ปีที่แล้ว +1

    Fantastic video, very wise advise in all of it. Thanks so much for sharing your vast knowledge once again Mr. Ferrari !

  • @Christian200773
    @Christian200773 ปีที่แล้ว +1

    Great Video. Specially for beginners.

  • @oscariglesias1268
    @oscariglesias1268 3 ปีที่แล้ว +3

    Gracias, que consejos tan buenos

  • @lamust7446
    @lamust7446 3 ปีที่แล้ว +1

    What you provide is simply outstanding. Thank you so much for providing content at such an exceptional level. Amazing.

  • @antoniogarrido3058
    @antoniogarrido3058 3 ปีที่แล้ว +1

    Thanks Alberto! Valuable advices.. SUPERnecesary video 👍

  • @joceirchaves316
    @joceirchaves316 3 ปีที่แล้ว +1

    Great explanation! Mainly about functional languages.

  • @ayandapeter1681
    @ayandapeter1681 2 ปีที่แล้ว +1

    Thanks Alberto

  • @iproskurnya
    @iproskurnya 3 ปีที่แล้ว +14

    What was the reason for Microsoft making this unintuitive language? They wanted to simplify everything but instead created a monster. SQL is an industry standard and a lot more simplier. Every imperative programming language has a debug option, and you can fix errors by debugging. DAX has no debug options, you have to keep in mind contexts, filters etc. If you are wrong in your assumptions nothing can help you.

    • @marcorusso7472
      @marcorusso7472 3 ปีที่แล้ว +19

      SQL is not a composable language suitable for a semantic model. A fair comparison is between DAX and MDX. You can use SQL to create queries, but I've never seen a good way to create reusable measures in SQL, besides simple aggregations.

    • @hamishmaxa6509
      @hamishmaxa6509 3 ปีที่แล้ว +2

      I'm not long starting in Power bi and am finding it hard to be able to naturally follow somebody else's DAX, let alone write much. Currently I do as much 'calculating' as I can in SQL before the data comes into the Power bi model. But I know I need to learn DAX because DAX is the key to being able to expand the number of questions that the end user can ask when they interact with the visuals you create, and only with DAX can you cleanly and in an efficient manner answer them. Frustrating but fun at the same time.

  • @paulopimentel1923
    @paulopimentel1923 2 ปีที่แล้ว +3

    Thank you for this video... I'm not alone, after all!! :)

  • @shafa7668
    @shafa7668 2 ปีที่แล้ว +1

    Really insightful. Thank you!

  • @MaurizioFaini
    @MaurizioFaini 3 ปีที่แล้ว +1

    Thanks, really interesting and useful.
    Although for me the "click" came on its own, I was doing something else and suddenly I understood the "context transition"
    ... maybe it's the DAX that works like this 😀

  • @kanchannatekar5798
    @kanchannatekar5798 4 หลายเดือนก่อน +1

    Too good explanation.

  • @porraloka31
    @porraloka31 3 ปีที่แล้ว +1

    Alberto at 17:40 you said something about making the code ALWAYS work and I tried to make this distinctcount work with any column I'd put in the matrix visual, but, that's no way to guarantee that right? In the end I wrote this code that works with Year:
    COUNTROWS(
    SUMMARIZE(
    Sales,
    Sales[CustomerKey],
    'Date'[Year]
    )
    )
    For this kind of problem you need to summarize by the columns you're putting in the visual or am I missing something? I Thought of using isinscope but it wouldn't work as well.

  • @nimeshkotadia6526
    @nimeshkotadia6526 3 ปีที่แล้ว +1

    Thanks for this video Alberto. Really appreciate your help in learning DAX.
    Just one question, do you think/know if Microsoft has any options other than DAX language for PowerBi because it is hard and might not click with lot of folks around the world?
    Any thoughts on this?

  • @jjpp1970
    @jjpp1970 3 ปีที่แล้ว +1

    Great video.
    Thank you.

  • @clementejosemartinezserpas6335
    @clementejosemartinezserpas6335 3 ปีที่แล้ว +4

    Dax is not simple nor easy. I wish it to be an intuitive language like SQL. The only good thing about Dax is Alberto.

  • @bouseuxlatache4140
    @bouseuxlatache4140 3 ปีที่แล้ว +1

    sometimes i think you are italian. another day finnish. anyway thanks for the presentation. terrific.

  • @marcing3364
    @marcing3364 2 ปีที่แล้ว

    Hi Alberto, is this correct measure?
    Distinct Customers =
    SUMX(
    VALUES(Customers[Year]),
    CALCULATE(DISTINCTCOUNT(Customers[Customer]))
    )
    Grazie mille per tutti i contenuti che fornisci 🙂

  • @rafalg8575
    @rafalg8575 3 ปีที่แล้ว +1

    Hi Alberto I decided to take ofertę as PowerBI Developer and I really want to be DAX expert. I am after DAX mastering course and I made 1 year projekt of optimizing inventory in PL/SQL and PowerBI. After this I join company with Microsoft stack (on prem) solution but with SSRS and over 1 year I started to feel that PowerBI is for sure tool I want to be profesionally exposed to. What suggestion do you have if new project will be in the area if cybersecurity with app. 500 KPI. Thanks in advance.

    • @SQLBI
      @SQLBI  3 ปีที่แล้ว

      Also study the Tabular model and consider Tabular Editor for your productivity!

  • @davidsuarez1005
    @davidsuarez1005 3 ปีที่แล้ว +1

    Thanks a lot, Dax is great

  • @pbihari0214
    @pbihari0214 3 ปีที่แล้ว +1

    Thank you

  • @felipesignorellireis7839
    @felipesignorellireis7839 3 ปีที่แล้ว +2

    very good Alberto. I really think dax hard.

  • @greisboy425
    @greisboy425 ปีที่แล้ว

    It's feel difficult because most of peoples who learning dax is not coming from computer science student, but many from Management or Accountant student, or business consultant who know nothing about database. For example, concepts like entity, relationship (foreign key, primary key, one-to-many and many to many relationship), data normalization, dimension table, fact tabel is need to be able to create a good model in dax or power pivot.

    • @SQLBI
      @SQLBI  ปีที่แล้ว

      This is true for any tool that manages a database, not just Power BI. Other tools don't have a language as powerful as DAX and they force the user to create a clean data model (perhaps, a single table - which is not flexible at all in data navigation). Just because DAX allows you to create complex formulas managing complex models, it doesn't mean it's a good idea.

  • @juanlauroaguirre5646
    @juanlauroaguirre5646 2 ปีที่แล้ว

    Ciao Alberto! Greetings from Mexico, you mention the way to master Dax involves practice, practice, practice and then some more practice....yes I agree but whats the best source of drill excercises? I would be great to have dozens if not hundreds of increasingly complex DAX excercises to actually get that musscle pumping, thanks for any recomendation!

    • @SQLBI
      @SQLBI  2 ปีที่แล้ว

      We have tens (not hundreds) of exercises in the Mastering DAX video course: www.sqlbi.com/p/mastering-dax-video-course/

  • @AGBDej
    @AGBDej 3 ปีที่แล้ว +1

    Great video
    Thank you

  • @wojtekmzks
    @wojtekmzks 3 ปีที่แล้ว

    Hi Alberto! Is it the optimal way to achieve the proper result for distinct count of customers with summarize values in total with best performance? :)
    var vTable =
    SUMMARIZE(
    FactOnlineSales
    , Calednar[Year]
    , DimCustomer[CustomerKey]
    )
    var Result =
    COUNTROWS( vTable )
    return
    Result

    • @SQLBI
      @SQLBI  3 ปีที่แล้ว +1

      This way you sum the customers over years. If it is what you want, fine. However, this calculation could be slow in certain reports and fast in others. See www.sqlbi.com/articles/analyzing-distinctcount-performance-in-dax/

  • @tv.TheDogFather
    @tv.TheDogFather 3 ปีที่แล้ว

    Besides the Distinct Count of the Customers with the Sum of the Yearly Distinct Count game that you provided (17:00), can SQL BI provide other sample games that we can use to challenge our DAX skills? What SQL Server sample database are you using for the Distinct Count of the Customers with the Sum of the Yearly Distinct Count game?

    • @SQLBI
      @SQLBI  3 ปีที่แล้ว

      We created customized versions of Contoso. We use the small versions in sample files for articles published on www.sqlbi.com
      The complete SQL Server databases in different sizes are available as part of the Mastering Tabular video course training material: www.sqlbi.com/p/mastering-tabular-video-course/

  • @Reduce_Scan
    @Reduce_Scan 3 ปีที่แล้ว

    Are there educational courses you offer on line ?

    • @SQLBI
      @SQLBI  3 ปีที่แล้ว

      Yes, you can find our offer here: sqlbi.com/training

  • @eagillum
    @eagillum ปีที่แล้ว

    23:40- DAX studio

  • @spilledgraphics
    @spilledgraphics 3 ปีที่แล้ว +2

    What is Alberto eating? He´s getting younger while all of us, older..... 🤯

  • @hoges510
    @hoges510 3 ปีที่แล้ว +2

    You forgot to addcolumns, DAX is addictive.

  • @mauriciovillatoro9361
    @mauriciovillatoro9361 9 หลายเดือนก่อน +1

    I don't think the problem lies with DAX; I believe that any coding language would be challenging if you are forced to write it in the Power BI formula bar.

  • @Sandroider
    @Sandroider ปีที่แล้ว +2

    DAX is easy, CALCULATE makes DAX hard...

  • @CSHarvey
    @CSHarvey 2 ปีที่แล้ว

    Otherwise known as, how do we create an entirely unnecessary query language to replace SQL so that we can sell new products and services, now that the SQL market is saturated.

    • @marcorusso7472
      @marcorusso7472 2 ปีที่แล้ว

      I'm sorry you misinterpreted the video.

  • @ricardo8500
    @ricardo8500 ปีที่แล้ว +1

    I don't think dax is a functional language. In a functional language, functions always return the same output given the same input. And this, precisely, is the reason why dax is so difficult for me, because given the same inputs to the functions, they return different outputs, according to the contexts.

    • @SQLBI
      @SQLBI  ปีที่แล้ว +1

      Agreed, we should say that its syntax is that of a functional language, even though the language as a whole is not.
      By design, DAX works in different contexts, allowing you to write a measure that will work in any report. Without such a design, you would write one query for each report, which is not what DAX has been designed for.

    • @ricardo8500
      @ricardo8500 ปีที่แล้ว

      @@SQLBI Thanks for your reply.

  • @Sandroider
    @Sandroider 3 ปีที่แล้ว

    Alberto: "...but still I really struggle with DAX..."
    Me: "hmm, should I start learning DAX?"

    • @SQLBI
      @SQLBI  3 ปีที่แล้ว

      Yes!

  • @brianyang1572
    @brianyang1572 ปีที่แล้ว +2

    Definitely not easy

  • @gleniu2
    @gleniu2 2 ปีที่แล้ว +1

    Too much talking.

  • @borismario
    @borismario 3 ปีที่แล้ว +1

    😧
    hahaha