7 reasons DAX is not easy

Поделиться
HTML-код
  • Опубликовано: 1 авг 2024
  • DAX is simple, but it is not easy. Watch the video to learn why, and remember: Practice. The. Fundamentals.
    Article: www.sqlbi.com/blog/alberto/20...
    How to learn DAX: www.sqlbi.com/guides/dax/?aff=yt
    The definitive guide to DAX: www.sqlbi.com/books/the-defin...
  • НаукаНаука

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

  • @Mucahtkutlu
    @Mucahtkutlu Год назад +20

    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 Год назад +1

      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!

  • @adan8657
    @adan8657 2 года назад +30

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

  • @sebbean881
    @sebbean881 2 года назад +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!

  • @rick_.
    @rick_. 2 года назад +17

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

  • @spilledgraphics
    @spilledgraphics 2 года назад +11

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

  • @paravej
    @paravej 2 месяца назад +1

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

  • @vilmarsantos3419
    @vilmarsantos3419 2 года назад +11

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

  • @tommyhao7699
    @tommyhao7699 2 года назад +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!

  • @egorshiyanov1206
    @egorshiyanov1206 2 года назад +13

    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!

  • @qiancasper
    @qiancasper 2 года назад +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

  • @massimocolaceci
    @massimocolaceci 2 года назад +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.

  • @sergio_molinari
    @sergio_molinari 2 года назад +2

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

  • @saharlatifi3510
    @saharlatifi3510 2 года назад +3

    Hi Alberto, thanks for this video. It's very encouraging. I have started learning DAX by watching RUclips 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.

  • @sukoi2113
    @sukoi2113 2 года назад +1

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

  • @virginiacosta2798
    @virginiacosta2798 2 года назад +2

    Great, Alberto! Opened my mind. Thank you!

  • @chadweber1582
    @chadweber1582 2 года назад +1

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

  • @drivetrainerYT
    @drivetrainerYT 2 года назад +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 2 года назад +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  2 года назад +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 6 месяцев назад

      100% agree with you yoray

    • @mauriciovillatoro9361
      @mauriciovillatoro9361 6 месяцев назад

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

  • @yekhtiari
    @yekhtiari 2 года назад +2

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

  • @Charlie888
    @Charlie888 2 года назад +1

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

  • @lamust7446
    @lamust7446 2 года назад +1

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

  • @mau_lopez
    @mau_lopez 2 года назад +1

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

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

  • @Christian200773
    @Christian200773 Год назад +1

    Great Video. Specially for beginners.

  • @ozansen_ozibaba
    @ozansen_ozibaba 2 года назад +1

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

  • @vietndk5437
    @vietndk5437 Год назад +1

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

  • @markushermes9153
    @markushermes9153 Год назад +1

    Brilliant explanation, Alberto, -pure Brilliance ! Thanks !

  • @antoniogarrido3058
    @antoniogarrido3058 2 года назад +1

    Thanks Alberto! Valuable advices.. SUPERnecesary video 👍

  • @joceirchaves316
    @joceirchaves316 2 года назад +1

    Great explanation! Mainly about functional languages.

  • @oscariglesias1268
    @oscariglesias1268 2 года назад +3

    Gracias, que consejos tan buenos

  • @ayandapeter1681
    @ayandapeter1681 2 года назад +1

    Thanks Alberto

  • @jjpp1970
    @jjpp1970 2 года назад +1

    Great video.
    Thank you.

  • @thiyagua6553
    @thiyagua6553 2 года назад +1

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

  • @shafa7668
    @shafa7668 Год назад +1

    Really insightful. Thank you!

  • @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!!

  • @AGBDej
    @AGBDej 2 года назад +1

    Great video
    Thank you

  • @franciscoherrera1990
    @franciscoherrera1990 2 года назад +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!

  • @kanchannatekar5798
    @kanchannatekar5798 Месяц назад +1

    Too good explanation.

  • @ed2672
    @ed2672 Год назад +2

    appreciate your sharing. this is super useful!

  • @pbihari0214
    @pbihari0214 2 года назад +1

    Thank you

  • @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! :)

  • @BolajiBI
    @BolajiBI 2 года назад +1

    Every person learning DAX needs to watch this!

  • @paulopimentel1923
    @paulopimentel1923 2 года назад +3

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

  • @FernandoSpalterMoretto
    @FernandoSpalterMoretto 2 года назад +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

  • @MaurizioFaini
    @MaurizioFaini 2 года назад +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 😀

  • @iproskurnya
    @iproskurnya 2 года назад +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 2 года назад +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 2 года назад +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.

  • @davidsuarez1005
    @davidsuarez1005 2 года назад +1

    Thanks a lot, Dax is great

  • @nimeshkotadia6526
    @nimeshkotadia6526 2 года назад +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?

  • @porraloka31
    @porraloka31 2 года назад +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.

  • @clementejosemartinezserpas6335
    @clementejosemartinezserpas6335 2 года назад +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.

  • @felipesignorellireis7839
    @felipesignorellireis7839 2 года назад +2

    very good Alberto. I really think dax hard.

  • @bouseuxlatache4140
    @bouseuxlatache4140 2 года назад +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 🙂

  • @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/

  • @tv.TheDogFather
    @tv.TheDogFather 2 года назад

    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  2 года назад

      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/

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

  • @rafalg8575
    @rafalg8575 2 года назад +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  2 года назад

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

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

    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  2 года назад +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/

  • @spilledgraphics
    @spilledgraphics 2 года назад +2

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

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

    23:40- DAX studio

  • @mauriciovillatoro9361
    @mauriciovillatoro9361 6 месяцев назад +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.

  • @hoges510
    @hoges510 2 года назад +2

    You forgot to addcolumns, DAX is addictive.

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

    Are there educational courses you offer on line ?

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

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

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

    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.

  • @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 2 года назад

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

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

      Yes!

  • @brianyang1572
    @brianyang1572 Год назад +2

    Definitely not easy

  • @Sandroider
    @Sandroider Год назад +2

    DAX is easy, CALCULATE makes DAX hard...

  • @borismario
    @borismario 2 года назад +1

    😧
    hahaha

  • @gleniu2
    @gleniu2 2 года назад +1

    Too much talking.