Writing DAX with ChatGPT-4 - Unplugged #50

Поділитися
Вставка
  • Опубліковано 15 жов 2024
  • A special unplugged video where we write DAX measures with ChatGPT-4!
    Read more about the "unplugged" format: www.sqlbi.com/...
    #unplugged #chatgpt #gpt4 #dax

КОМЕНТАРІ • 56

  • @timolff9239
    @timolff9239 Рік тому +25

    this actually helps me learn DAX much better than the usual videos, because this video (uniquely) works as kind of a dialogue experience, like you're having an active classroom experience between a student and the teacher, where paradoxically chatgpt takes the role of the student here and marco commenting on chatgpt takes the role of the teacher. Different way to phrase it: i think as a student (me, the viewer) it is more helpful to see marco try to engage with someone who only half understands the thing to be learned, rather than marco talking at his own pace and me running the risk of losing track entirely

    • @marcorusso7472
      @marcorusso7472 Рік тому +5

      Several months ago, I thought about using ChatGPT for this kind of interaction, but I always needed to catch up because of other priorities. The other day there was the perfect storm: I completed a long-term internal project, and ChatGPT-4 was just released.
      The longer-term goal could be a "Teaching DAX to ChatGPT" series... I'll think more about it :)
      Thanks for the feedback!

    • @timolff9239
      @timolff9239 Рік тому +3

      @@marcorusso7472 Thanks! What i think is most valuable in this format and what you could do more, is explaining why chatgpt is wrong or why it is right when chatgpt suggests something. Maybe with your expertise you could even theorize about what the line of thinking of chatgpt might have been when it makes a wrong suggestion. You already do this but this is the most valuable for my educational value

    • @gatesdabeast
      @gatesdabeast Рік тому

      It has done the same for me

    • @jjsara123
      @jjsara123 Рік тому

      Agree with all your points here including the opportunity for deeper explanation of why it's wrong. Marco the other factor is - Whereas with your normal videos, I have to muster up the mental energy and attention to 'get through it' because it's so densely packed, which is of course your goal.. But in this format, it's more like reality TV- it's hard to put it down! Get some popcorn, what's gonna happen next!?!

    • @mrbartuss1
      @mrbartuss1 5 місяців тому

      @@marcorusso7472 We still would like to see that :D

  • @Sitius86
    @Sitius86 Рік тому +5

    MarcoGPT strikes again. Love this format. Thank you so much.
    I really appreciate how much effort you put into your training videos and classroom sessions. This format feels close to the classroom experience where a student asks a good question and you work through it for all of us.

  • @analistax
    @analistax 11 місяців тому +1

    Para quem não sabe, este vídeo é um case fantástico para testar seu conhecimento em DAX e mostrar o quanto podemos entender com a leitura dos exemplos. Se funciona, se não funciona, se pode ser melhorado. Perfeito.

  • @drod96
    @drod96 Рік тому +11

    I haven’t even started and I’m excited to see professionals like you guys to try this!

    • @drod96
      @drod96 Рік тому

      I thoroughly enjoyed you breaking down on whether they answer is right or wrong and why. It provides a special skill to be able to utilize the AI because you know what the problem is down to the calculation needed. This has shown me how much your actual products work that much more this was a joy to watch.

  • @rolf7135
    @rolf7135 Рік тому +3

    This is an interesting video that inspired me to try it myself. I asked Chat GPT 4 about learning DAX, and its first external source was SQLBI (I am not surprised 🙂). Unfortunately, I do not use DAX so often in my work, but as I do not have any good reporting system it would be very useful, so the method you show, trying to lead it in the right direction could be very helpful for me as well. However, I am going to give it the field names and keys for tables. I think what could be good about this is that it gives the learning momentum on actual data.

  • @RodrigoBocanegraCruz
    @RodrigoBocanegraCruz Рік тому

    Thanks for this Marco. I am constantly using GPT to help me with multiple coding needs, especially because I need to work with different languages from time to time, so I cannot remember the sintaxis of each of them or keep up to date.
    One hint is to ask always for good coding practices, include comments to the code and even unit tests!. This helps the engine to refine it's own output and usually follow a step by step process. Sometimes this plays against performance and other considerations must be taken.
    Finally, the better context we provide, like table definition, dictionary and even sample values, the better the generated code.
    But as you say, it is not always correct and we have to test and confirm everything.

  • @GregKramerTenaciousData
    @GregKramerTenaciousData Рік тому +3

    luved this! GPT & Marco unplugged has to become a regular thing!

  • @reng7777
    @reng7777 Рік тому +2

    For this channel i would say the the number of subscribers should be more than 1 million and not just 74k.. but as always there are more subscriber to see what the Kardashians do eveyday than math, excel or DAX formulas tutorial so ashame!

  • @AnilAnvesh
    @AnilAnvesh Рік тому +1

    One way to imrprove ChatGPT dax efficiency is by teaching it. You can input working DAX codes from DAX Patterns to ChatGPT. It will memorize it.

  • @NestorAdrianzen
    @NestorAdrianzen Рік тому +1

    Nice!😀 I also gave it a shot a few weeks ago and the answers were definitely surprising in terms of accuracy and inaccuracy.

  • @lukaszk4388
    @lukaszk4388 Рік тому +2

    Very good content ! I appreciate chat GPT as assistant to certain syntax queries or explaining basics of the concept. It looks like for reasoning and answering business questions it is far behind. As conclusion of the video I took that this is great tool if used in the right hands meaning that understanding of how things work is key if you want to benefit from this technology. I wish you can do more video like this in the future!

  • @philippelafage5316
    @philippelafage5316 Рік тому +3

    Thank you so much for this podcast. It is exacly the way I would like to show to young students. A good master could served by a good slave. So we should be careful with chat replies. But The program will learn a lot as soon a lot of people train the system by challenging it Thanks for your excellent contribution as always

  • @gvitullib
    @gvitullib Рік тому +1

    Great video Mario. I Think this should be an interesting topic (exploring Dax code on chat GPT4) for the unplugged serie.

  • @giorgioniani6296
    @giorgioniani6296 Рік тому +1

    Excellent Video Marco, Thank you very much!

  • @MAbdullah47
    @MAbdullah47 Рік тому +1

    Thank you marco for this video , Is the aim of this video to demonstrate the capability of chatgpt to help us in Writing Dax expression ?

  • @estebansuarezcastro7053
    @estebansuarezcastro7053 Рік тому +4

    Extra tip before start asking about DAX:
    "Act as an expert in Microsoft Power BI"

  • @powerbinareal
    @powerbinareal Рік тому +1

    Se tá doido eu ando pirando com isso! #powerbinareal

  • @AnilAnvesh
    @AnilAnvesh Рік тому

    Also, don't forget it is trained on data until 2021. With search plugins may be it can get latest data

  • @jjsara123
    @jjsara123 Рік тому +1

    "I'm not sure I can help him" 🤣

  • @gustavobarbosa906
    @gustavobarbosa906 Рік тому +1

    I do agree with you. It is not ready for the unexperienced. Bur, it seems to be improving for sure.
    I'm now retired, but I have concerns about what will happen to the coding profession when it starts to always give optimal solutions.
    In the many-pages technical report on version 4, the possibility of having the model use other software tools is suggested, meaning that it will be capable of writing AND testing the code. Do you think this is worrisome?

    • @marcorusso7472
      @marcorusso7472 Рік тому +2

      Is it possible? Yes.
      Are we there? Definitely not.
      I think that the right approach is to understand and evaluate. Change is the only constant.

    • @joshash5944
      @joshash5944 Рік тому +5

      Superb point... this is the whole next chapter - chatgpt needs to be able to see the results of code it generates... i.e. it needs to be able to execute it.
      I don't think we're far from this.

  • @timolff9239
    @timolff9239 Рік тому +2

    this was super fun to watch.

  • @AnilAnvesh
    @AnilAnvesh Рік тому

    By the way, what browser are you using?

  • @joshash5944
    @joshash5944 Рік тому +1

    Great video, mirrors my own experience with more complex DAX..
    But ChatGPT is quite poor at DAX - it's a lot better at Python.
    I use it like an accelerated search engine when coding Python, and as a tool to generate skeletons.
    It particularly shines in scenarios like 'What is the correct format of the connection string and function arguments when using library x to connect to database y' - finding this type of answer is a lot faster using chatgpt than google.
    In the past I've had a lot of people coming to me asking me for help with their complex queries and their code. I suspect in future people will be asking for help to find issues/problems with machine generated code.

    • @SQLBI
      @SQLBI  Рік тому +1

      Agreed. We were quite disappointed ChatGPT didn't copy code from www.daxpatterns.com ! :-)

    • @joshash5944
      @joshash5944 Рік тому +1

      @@SQLBIit's waiting to be retrained on Definitive Guide to DAX 3rd edition..
      Looking forward to it :D

  • @michellesmith9643
    @michellesmith9643 Рік тому

    Hello, Would you be open to discussing training opportunities with O'Reilly Media?

  • @AnilAnvesh
    @AnilAnvesh Рік тому

    It's all about the prompt. You need to be more descriptive and provide all the information. Then you are most likely to get working code.

  • @joaocampeloribeiro6038
    @joaocampeloribeiro6038 Рік тому

    Very cool… I didn’t watch the all video, but although I believe this could be helpful for someone who understands already Dax, but your code is always model based. Sometimes you need to remove a certain filter or inactivate relationship between tables, hardly chat gpt could help. But perhaps in the future, who knows…

    • @SQLBI
      @SQLBI  Рік тому

      We know, but we wanted to experiment - also the DAX code that does not require a good model knowledge doesn't work well. There is a long way ahead.

    • @joaocampeloribeiro6038
      @joaocampeloribeiro6038 Рік тому

      @@SQLBI my comment was for the general public, I know you know :D, as I am your student on mastering dax, data modelling, and dax optimization. Best wishes

  • @drkamikaze1
    @drkamikaze1 Рік тому +2

    I tried it in the past but saw that it makes a lot of mistakes. It was gpt3 though.
    It gave few suggestions but all the dax was incorrect.
    E.g i tried to get it to return a calculated column to give value rounded to nearest 10 minutes but it failed to give anywhere close to correct answer

  • @christianplesner9152
    @christianplesner9152 Рік тому

    I have an outstanding challenge for a measure that I want to perform better. I've tried ChatGPT4 and unfortunately there seems to be no help here. The measure is defined below and I'm trying to calculate the Age at the selected point in time (by the end user) and then tying the calculated age to my Age[Age] attribute for end user filtering. In my mind it would make sense to "summarize" countrows of all combinations of datediff(MinDate,PurchaseDate) in years after the valid SCD Type 2 rows have been filtered out first. But to get that to perform better than below working measure doesn't seem possible
    Number of products =
    VAR MinDate = MIN ( 'CalendarDate'[Date] )
    VAR Calc =
    CALCULATE (
    COUNTROWS ( 'Product' ),
    'Product'[DW_ValidFrom] = MinDate,
    all ('CalendarDate'),
    FILTER (
    'Product',
    VAR AgeCalculated =
    IF (
    'Product'[PurchaseDate]

    • @SQLBI
      @SQLBI  Рік тому

      We hope that the video was clearly a test of the state-of-the-art - which is not ready to write DAX in a professional way.
      For serious stuff, use the right resources. For example, you describe a case that is a variation of the events in progress pattern: www.daxpatterns.com/events-in-progress/

  • @adamtomasz-qn3di
    @adamtomasz-qn3di Рік тому +1

    Do You think BI developers should be worried in perspective of 10 or 20 years?

    • @SQLBI
      @SQLBI  Рік тому +4

      They should be worried if they don't stay up-to-date with the technology in general (and the BI tools/languages in particular) in 2-3 years!

    • @yanivhochma7884
      @yanivhochma7884 Рік тому

      @@SQLBI Can you explain, please?

    • @SQLBI
      @SQLBI  Рік тому +4

      The risk is bigger by using technologies that are not productive, such as creating one report at a time in SQL rather than creating a semantic model and producing many more reports with just a simple user interface (as you can do in Power BI or similar tools).
      The video clearly shows that someone must be able to evaluate the correctness of the answers, which raises the question of whether it's more productive or not than a human when you the validation cost is bigger than writing a short formula from scratch.

  • @FRANKWHITE1996
    @FRANKWHITE1996 Рік тому +1

    Subscribed ❤

  • @super-sal
    @super-sal Рік тому

    I see answers same as in chatgpt 3 so what's the difference you have found in chatgpt 4

    • @marcorusso7472
      @marcorusso7472 Рік тому +6

      It's less wrong, and the approach is less "random". Still not accurate enough, but I definitely see an improvement. Not a generational change, but an improvement.

  • @mahammadalamin3953
    @mahammadalamin3953 Рік тому

    it's not available in saud arabia ????

    • @SQLBI
      @SQLBI  Рік тому

      We don't know!

  • @TheReneporto190
    @TheReneporto190 Рік тому

    In fact you are training the model.

  • @xMastJedi
    @xMastJedi Рік тому +1

    conclusion - ChatGPT is for professionals, not for green-horns or 'wannabe', because only pro can challenge calculated numbers.

  • @AkshayKumar-vd5wn
    @AkshayKumar-vd5wn Рік тому

    Well I guess I am going to be losing my job soon.

    • @SQLBI
      @SQLBI  Рік тому +5

      If you watch the video, it's probably the opposite!