Debugging a slow Power BI report with Phil Seamark

Поділитися
Вставка
  • Опубліковано 10 лип 2024
  • Phil sits down with us to walk through his process in debugging a slow Power BI report. This uses some new features in Power BI Desktop as well as using DAX Studio to get further insights.
    Connect with Phil
    Twitter: / philseamark
    Blog: dax.tips/
    Guy in a Cube courses: guyinacu.be/courses
    ********
    LET'S CONNECT!
    ********
    -- / guyinacube
    -- / awsaxton
    -- / patrickdba
    -- / guyinacube
    -- / guyinacube
    -- guyinacube.com
    **Gear**
    Check out my Tools page - guyinacube.com/tools/
    #PowerBI #DAX #Performance
  • Наука та технологія

КОМЕНТАРІ • 104

  • @GuyInACube
    @GuyInACube  4 роки тому +23

    Saw a bunch of comments on this. Try not to get caught up in the DISTINCTCOUNT vs. SUMX. The point of the video was the debugging technique. As Phil called out in the video, you may not see it have better performance on your end. Always test and verify. We chatted with Marco Russo as well. He commented that he would start but understanding what DISTINCTCOUNT was performing badly first. Could be due to relationships (maybe bi-direction), etc... the SUMX approach isn't exactly doing the same thing. Which is why mileage will vary.

    • @samanateeq3203
      @samanateeq3203 3 роки тому

      How about Countrows( Values (Column name) ) ,why Sumx @Guy in a Cube

  • @Sarabjitsethi
    @Sarabjitsethi 4 роки тому +7

    Phil Seamark is my all time FAV... Glad to see you sir with guyinacube ... I was lucky enough to meet you in person... THANKS A LOT! You are real DAX GURU..

    • @GuyInACube
      @GuyInACube  4 роки тому +1

      Phil is a great person and super smart! We were happy to get him onto the video. 👊

  • @Tamashiwa
    @Tamashiwa 4 роки тому +9

    Whoa, that is a sneaky way of fooling a DISTINCTCOUNT, love it! Also, kudos for the SE analogy.

    • @GuyInACube
      @GuyInACube  4 роки тому +2

      Yeah it was pretty neat. Just be careful as it won't perform better every time. Test and verify ;) 👊

  • @dhawalpmehta
    @dhawalpmehta 4 роки тому +3

    This is great, more and more techniques on troubleshooting is always helpful, nice to see Phil and have a great trip to NL guys

    • @GuyInACube
      @GuyInACube  4 роки тому

      Appreciate that! We love the troubleshooting stuff. Thanks for watching. 👊

  • @topher60657
    @topher60657 4 роки тому +2

    Great video, will help me with some challenges I'm working on now - perfect timing guys. Please keep up the great work!

    • @GuyInACube
      @GuyInACube  4 роки тому

      Love it! Thanks for watching 👊

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

    Awesome. Thanks Adam and Phil 👍👍

  • @just_pbi
    @just_pbi 3 роки тому +1

    This was very helpful! Didn't even know PBI has a Performance Analyzer!

  • @ravianand4250
    @ravianand4250 9 місяців тому

    Bro, this was the real magic ...Please keep up the great work!

  • @salohcinnosnah6379
    @salohcinnosnah6379 4 роки тому +2

    Guys, this was such a useful tuning 101, huge thanks. I'm slowly but surely getting to grips with Power BI/DAX coming from a SQL Server background. Had no idea you could copy the query from report elements. Thanks again, a really great nugget.

    • @GuyInACube
      @GuyInACube  4 роки тому

      YES!!! It's the little things that help you move the needle 👊

  • @pratikfutane8131
    @pratikfutane8131 4 роки тому +2

    Brilliant !! Thanks for making this available. Eagerly looking forward to more such techniques for better Reporting!! Loved It!! Many Thanks!!

    • @GuyInACube
      @GuyInACube  4 роки тому +1

      Awesome! We definitely want to get more content out like this. Thanks for watching! 👊

  • @tomaskavicky
    @tomaskavicky 3 роки тому

    very handy lads, thanks

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

    So glad to hear that off-hand comment about filtering on fact tables over dimensions, that's a pet peeve of mine that I had a gut feeling was a bad idea, I'd just never gone to research it.

  • @praveennani154
    @praveennani154 2 роки тому

    Great video 👌💯

  • @addendanalytics-microsoftg5620
    @addendanalytics-microsoftg5620 4 роки тому +1

    Great video. Very helpful for a problem at hand :)

    • @GuyInACube
      @GuyInACube  4 роки тому

      Love it! It has helped us numerous times 👊

  • @last_minute_film
    @last_minute_film 2 роки тому

    Amazing Video guys. very very informative. Could you guys show how you take that enhanced query from DAX studio and use it in PowerBI.

  • @mouhannadoweis7605
    @mouhannadoweis7605 4 роки тому +1

    Thank you for all of your work

  • @highpinghealz5830
    @highpinghealz5830 4 роки тому +2

    Pretty awesome, going to definitely try this out. Thanks guys!

    • @GuyInACube
      @GuyInACube  4 роки тому +1

      Awesome! Glad to hear this may help you track some things down. Thanks for watching. 👊

  • @DavidWilsonNZ
    @DavidWilsonNZ 4 роки тому +2

    Awesome! Love this. Thank you team.

    • @GuyInACube
      @GuyInACube  4 роки тому

      Most welcome! Thanks for watching. 👊

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

    thats very useful feature.. thankyou guys...

  • @kyleparsons1735
    @kyleparsons1735 4 роки тому +3

    This is pure gold! The distinctcount trick was brilliant and helped my reports a good deal!

    • @MrRJolly
      @MrRJolly 4 роки тому +1

      Please remember, this won't always be faster. Just try it with your dataset and see.

    • @GuyInACube
      @GuyInACube  4 роки тому +2

      Agreed with Phil. Your mileage may vary. Always test and verify based on your dataset and query patterns. The distinct count part wasn't the point of the video and was just a quick example Phil threw together to talk about the debug technique. Talking to Marco Russo, he suggested, for DISTINCTCOUNT specifically, to try to understand why DISTINCTCOUNT is performing badly and try to fix that first before replacing it.

    • @kyleparsons1735
      @kyleparsons1735 4 роки тому +1

      @@GuyInACube Right right right, that makes sense. Thanks for the clarification guys!

  • @surnameh7227
    @surnameh7227 2 роки тому

    Perfect, thank you!

  • @needubey
    @needubey 4 роки тому +2

    Thanks for this super video. Trying it out now

    • @GuyInACube
      @GuyInACube  4 роки тому

      Most welcome! Thanks for watching. 👊

  • @akeemadedigba8279
    @akeemadedigba8279 3 роки тому

    I love the process, can you please explain how you return the query back to powerbi desktop, you guys are amazing.

  • @TheerayoothKosin07
    @TheerayoothKosin07 4 роки тому +2

    Useful technique, thx a lot

    • @GuyInACube
      @GuyInACube  4 роки тому

      Most welcome. Thanks for watching! 👊

  • @alt-enter237
    @alt-enter237 4 роки тому +4

    Really nice job Phil (and as always, Adam). I loved the analogy about getting cake ingredients one by one. Definitely going to steal that one with pride! Really helpful for providing an overall methodology that can be applied no matter the scenario. As you say below, Adam (or is it above?)--actual results may vary.

    • @GuyInACube
      @GuyInACube  4 роки тому

      The grocery store analogy was great! Steal away 😀 Yeah results will always vary. Everyone's data is different.

  • @fethiys2007
    @fethiys2007 3 роки тому

    You're perfect guys, sumx trick made my visual 4x faster!

  • @venkat7964
    @venkat7964 4 роки тому

    Kudos.We need more performance videos. You showed only matrix visual what if we have many visuals in a page and using different functionalities. Please make a video on this

  • @vog5197
    @vog5197 4 роки тому +6

    This is fantastic, more performance videos please! My query went from 12,460 to 121 ms!

    • @MrRJolly
      @MrRJolly 4 роки тому +2

      Woah! Nice, was that just from using this technique?

    • @GuyInACube
      @GuyInACube  4 роки тому +1

      WOW!!! That's amazing. Did you achieve that by using this technique?

    • @vog5197
      @vog5197 4 роки тому +3

      @@GuyInACube Yeah! Phil and your enthusiasm made me start doubting myself, so I replicated the whole experiment, here are the two DAX studio results: (not sure if youtube allows links)
      abload.de/img/daxstudio0wjgp.png

    • @MrRJolly
      @MrRJolly 4 роки тому +1

      @@vog5197 Worked for me. Very impressive and well done! :)

  • @evawilhelmsson3469
    @evawilhelmsson3469 4 роки тому

    Big thanks for a great video! I am trying to debug a reeeeally slow Power BI report but got stuck when trying to copy the DAX Query from the performance analyzer. We're using Direct Query in our reports and in my script there's a line for "// SQL Query" and the output says that I can't run the select statement. Is there a way around this?

  • @chipsmithson1678
    @chipsmithson1678 4 роки тому +1

    Good Stuff! Wish i was at work right now to delve into some of users models. :)

    • @GuyInACube
      @GuyInACube  4 роки тому

      Thanks Chip! This was a really fun one to do. Love digging in like this as it pushes us to really learn how things work.

  • @heniekheniek1781
    @heniekheniek1781 4 роки тому

    Great vid!
    For some reason though, the measure redefinition in DAX Studio does not work for me. Even when I comment out all of Measure's lines and just make it [Measure] = 1, for some reason when I press Run, it still uses old definition.
    What am I doing wrong?

  • @naveenkalhan95
    @naveenkalhan95 4 роки тому

    what are the tools other than DAX Studio we can perform this DAX analysis???

  • @helloranjan89
    @helloranjan89 3 роки тому

    Life saver

  • @ChrisView777
    @ChrisView777 4 роки тому +2

    Love the Bifocal shirt as well :D

    • @GuyInACube
      @GuyInACube  4 роки тому

      Love the BIFocal guys (Jason and John). Listen to the podcast if you can. 👊

  • @akhilannan
    @akhilannan 4 роки тому +3

    Sumx trick for distinctcount is interesting. I assume replacing All(Calendar) with All(Calender[Date]) inside filter also improves performance in this example?

    • @MrRJolly
      @MrRJolly 4 роки тому +2

      Not by much. Clearing filters is fast. However if I was adding filters, I would target specific columns rather than an entire table.

  • @aashisehrawat
    @aashisehrawat 4 роки тому

    Does CALCULATE and FILTER combination has any impact on measure's speed and efficiency? Im struggling to find a solution to slow down my PBI report. Have tried everything on the internet.
    Thanks in advance, to you guys!

  • @FabioRBelotto
    @FabioRBelotto 4 місяці тому

    How do I get the new query from dax studio and replace it ln my visual ?

  • @luisedugarridosoares
    @luisedugarridosoares 4 роки тому +1

    Excellent article! What tools apart from Dax Studio you all recommend to troubleshooting performance issues? Thanks and have a great week ahead!

    • @GuyInACube
      @GuyInACube  4 роки тому +1

      VertiPaq Analyzer from sqlbi.com is a great tool that we use quite frequently to inspect the model. SQL Profiler can also be used for tracing, but DAX Studio does that as well and I can do more with that. Those are the main tools we use.

    • @luisedugarridosoares
      @luisedugarridosoares 4 роки тому

      Guy in a Cube Thank you all! Have a great week!

  • @jeffweir9358
    @jeffweir9358 4 роки тому +2

    Great video from @GuyInACube feat @PhilSeamark on how to bake fast DAX.
    If you're in Wellington, NZ then meet Phil in person on the last Tues of EVERY MONTH at the Wellington Excel & PowerBI User Group. Know PowerBI users in Wellington? Share this so they can find us and geek out!

    • @GuyInACube
      @GuyInACube  4 роки тому

      Appreciate that Jeffrey. Definitely a treat to sit down with Phil. Phil is amazingly smart.

  • @AliTwaij
    @AliTwaij 4 роки тому +1

    its good thankyou

    • @GuyInACube
      @GuyInACube  4 роки тому

      Glad you liked it Ali! 👊

  • @amangheewalla
    @amangheewalla 3 роки тому

    What if the majority of the time spent by a query is not in the Storage Engine but in the Formula Engine? While my SE queries are at 76, 97% of the query is spent in the FE and not the SE. Any recommendations for troubleshooting FE?

  • @Irgo25
    @Irgo25 4 роки тому +2

    Great video!
    Since I found the dax studio plus performance analyzer/VertiPaq, it really spice things up
    But THE question. What about the “OTHERS” measure listed by the performance analyzer? Hahaha

    • @MrRJolly
      @MrRJolly 4 роки тому +2

      Often that reflects how much time visuals are spent queuing behind one another to render. Might be a good topic for another video.

    • @UTUBE787878
      @UTUBE787878 4 роки тому

      @@MrRJolly Hi Phil, great video , very interesting.
      But I have a report with a lot of measures, each one only takes few ms for DAX query but more than 1000 ms in 'other' !!
      Where does it come from this 'other' time ?
      How can we debug this ?
      A video on that topic would be very helpful !!
      Thanks in advance,
      Pierrick

  • @harishstark
    @harishstark 2 роки тому

    Can you share the file that you're working with for our best practices

  • @Lu_Ca
    @Lu_Ca 4 роки тому

    RIP!
    I have a query that takes 14.55 minutes, (data from1997) is it possible to exclude a query from a data refresh, so that i can create a new truncated (faster) query and than merge the tables to have whole dataset?

  • @jeremyfirth
    @jeremyfirth 4 роки тому +2

    What the resources for learning about which functions are time-eaters, and what we can use as alternatives?

    • @GuyInACube
      @GuyInACube  4 роки тому +1

      As with all things, it depends. a given function may perform well in one situation, but then not with another. I would highly recommend getting the 2nd edition of the Definitive Guide to DAX. It is really helpful in understanding what is happening, especially under the hoods. Be sure to test and validate your items to also understand more.

  • @aleksandarmitrovic2395
    @aleksandarmitrovic2395 3 роки тому

    Hello, question about date tables. How to use dates with my country name mounths? Is it posibile?

  • @foxware5587
    @foxware5587 4 роки тому

    You could also try COUNTROWS ( VALUES ( Sales[Customerkey] ) ) in stead of SUMX ( VALUES ( Sales[Customerkey] ) ,1) Don't know if it's faster though....

  • @jomzrpg6312
    @jomzrpg6312 3 роки тому

    I have like 1.8 seconds total only, but the SE Queries are about 400+ ... Does that matter as long as total is not taking too long?

  • @carlosmarconybribeiro5748
    @carlosmarconybribeiro5748 4 роки тому +2

    Nice tricks, guys. But , what should I do when option Other is the major impact on the visual using performance analyzer ?

    • @MrRJolly
      @MrRJolly 4 роки тому +2

      How many visuals do you have on your page? Might be some queuing going on

    • @carlosmarconybribeiro5748
      @carlosmarconybribeiro5748 4 роки тому

      More than 30, including cards, tables and background images.

    • @GuyInACube
      @GuyInACube  4 роки тому +1

      yeah, that is probably one of the major contributors in your case. You should look at reducing the number of visuals. You mention tables as well. I've seen where tables and matrix visuals can contribute to it especially if you have a lot of stuff going into them.

    • @carlosmarconybribeiro5748
      @carlosmarconybribeiro5748 4 роки тому

      @@GuyInACube Thanks. I'll try. Congratulations for the channel. It's helping a lot to create amazing dashboards here. Come visit Brazil.👍

  • @MrPranavpatel72
    @MrPranavpatel72 4 роки тому +2

    Awesome, I am facing with my Power Bi dataset where we have the Import Data instead of Live connection.
    Will this help approach help me debug the issue? as I just have the dataset and it takes a lot time approximately ~2 hours for refreshing data.

    • @MrRJolly
      @MrRJolly 4 роки тому +2

      This technique will help you work on slow running DAX queries (import or DQ). It will not help you diagnose refreshing.

    • @MrPranavpatel72
      @MrPranavpatel72 4 роки тому

      @@MrRJolly Thanks for confirmation!! If you can just suggest what method can be used to see where exactly it take long for refreshing?

    • @GuyInACube
      @GuyInACube  4 роки тому +1

      It depends on the data sources. You do have some logging you can enable in Power BI Desktop for the mashup engine. This may help you but is hard to read. If it is SQL Server, i'd recommend getting tracing information from the SQL side as part of your data collection. It is not really straight forward though unfortunately.

  • @mwaltercpa
    @mwaltercpa 4 роки тому

    Love the tips, SE analogy, and seeing these variables, I’ll def try TREATAS as filter variables. That SUMX was interesting for sure.. I’m just getting into having to optimize my measures in matrix.. would love more tips and options for measures like this.

  • @theanti-winesnobclub2276
    @theanti-winesnobclub2276 3 роки тому +1

    Hello,
    I am I’m experiencing a performance issue with one of my reports and when I run the Performance Analyzer it says that for the time for all actions is slowed down by the “Other” Category. Analyzer report listed below:
    DAX Query 28
    Visual Display 43
    Other 16820
    I went through the steps that you show in this video and I only have about 1 or two SE Queries according to DAX Studio.
    Can you point toward where the issue is and how I can further troubleshoot it?
    Thanks!!

    • @GuyInACube
      @GuyInACube  3 роки тому

      If the "Other" bucket is the only large item you see, chances are you have too many visuals on your report. Check out this video for an example: ua-cam.com/video/kkIXtvU1AiM/v-deo.html

    • @theanti-winesnobclub2276
      @theanti-winesnobclub2276 3 роки тому

      Guy in a Cube Thank you for your timely response!
      It turned out that it was the OKVIz Smart Filter that was making the report very slow. I removed it and added the regular slicers and now the report is flaying!! Has this happened to anyone else?

  • @gripro1
    @gripro1 2 роки тому +1

    Distinctcount - the scourge..)

  • @jacobswell73112
    @jacobswell73112 3 роки тому

    My DAX studio is showing 39 ms while my performance analyzer is showing 305. Why is that?

  • @jayrodrabadon6609
    @jayrodrabadon6609 4 роки тому +1

    hmmm ... probably more SUMX than DISTINCTCOUNT in my reports this time :)

  • @saharazeem5588
    @saharazeem5588 4 роки тому

    Hi.... Please if you can make a vedio..in your report add buttons to each visual with and give command to print, or download the visual... Please

    • @GuyInACube
      @GuyInACube  4 роки тому

      Thanks for the video Sahar. If you'd like to provide product feedback to the Power BI Product team, you can give that at ideas.powerbi.com.

  • @federicoaguirre3006
    @federicoaguirre3006 3 роки тому

    I think this approach has some issues. When you use VALUES you also have to consider the fact that one blank row value may be returned, thus the sumx function would have a +1 extra row count.

  • @marcosgalvanisdfwer
    @marcosgalvanisdfwer 4 роки тому

    In this case, the DAX was taking a lot of time, but what happens when we have visuals where DAX is not the major time consumer? How can you make it faster?

    • @GuyInACube
      @GuyInACube  4 роки тому

      There is only so much you can do. Typically, the only major thing you could do is either limit the number of visuals, or if it is a table/matrix, try to make it no so complex so it doesn't have to spend as much time from a rendering perspective. Custom visuals also tend to have a higher render overhead than the base visuals.

  • @SabriCanOkyay
    @SabriCanOkyay 3 роки тому +1

    I've seen so few things more horrid than the "yooo" at the start of the video.

  • @data-science-ai
    @data-science-ai 2 роки тому

    Power BI sucks. I would ove an analytical platform where I could build a data model and use pandas to do data manipulation and aggregation.

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

      and that's exactly what it is not. it's not an analytical tool.