cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Girts
Frequent Visitor

Need advise to improve performance

Before a post, a new topic read already posted answers about improving Power BI/Power Query performance. Sorry for creating a new one - as I think my case is unique 🙂

 

Situation:

I have two kinds of data with a larger number of entries and some "support" tables, which are used as criteria. The first table contains journal entries from ERP and second one budgeting system. The task is to create financial reports with different KPI.

To achieve it, I need to make many modifications/calculations on first two table - to organize them and unite for the report needs. 

Right now did not finish my task, as during development/creation process my Power BI becomes slower with each step. 

 

All modifications can be grouped: calculations(math operations), table modifications (pivot/unpivot, removing columns, sorting), grouping values by criteria, merging tables (adding new values from another table). 

 

I guess that there should be like a priority for all those modifications - like grouping data before calculations (to get a balance it can be done in two ways: a) subtract from debit credit and after group values for account b) group values as first and after subtract debit from credit); to avoid table merging as much as possible. Where will calculation work faster - in power query or power bi (as measures) - as there is need to create cumulative values (end of the period from start of the year)?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Re: Need advise to improve performance

Hi @Girts,

in the link I've provided you'll also find a reference to this article: https://exceleratorbi.com.au/calculated-columns-vs-measures-dax/ which looks very relevant to me: Rentability % is mooost likely a case for measures (think a about the subtotals in your visualisations).

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark my post as a solution. Thanks!

Imke Feldmann

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

 

View solution in original post

5 REPLIES 5
Community Support
Community Support

Re: Need advise to improve performance

Hi @Girts,

 

For huge amount of records, I haven't found any effective solutions to improve calculation performance. Maybe you can try to summary them before get data to power bi.

 

AFAIK, current power bi not support create dynamic calculated column/table based on filter/slicer.So I'd like to suggest you use measures to instead.

 

In addition, please don't nested complex measures or write complex formula in condition functions.(e.g. sumx, countx...)

Optimizing DAX expressions involving multiple measures

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI
Super User III
Super User III

Re: Need advise to improve performance

Yes, grouping data first can be benefitial for certain calculations. I've collected some tips for performance improvements in the query editor here: https://www.thebiccountant.com/2017/05/29/performance-tip-partition-tables-crossjoins-possible-power...

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark my post as a solution. Thanks!

Imke Feldmann

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

 
Girts
Frequent Visitor

Re: Need advise to improve performance

Short additional info ...

My task becomes more complex as I need to add KPI to report, same time keeping journal entry values to drill down.

For example:

  • A Turnover
  • B Direct costs
  • C Bruto profit  = A - B
  • D Bruto profit rentability in % C/A  
  • ... etc 

Same time need to keep sums for the whole company and by costs centers as well (projects, departments). 

 

I tried to get it in one table, but I got more than 30 modifications. Now I am trying to split results in separate tables to unite them in one report. 

Super User III
Super User III

Re: Need advise to improve performance

Hi @Girts,

in the link I've provided you'll also find a reference to this article: https://exceleratorbi.com.au/calculated-columns-vs-measures-dax/ which looks very relevant to me: Rentability % is mooost likely a case for measures (think a about the subtotals in your visualisations).

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark my post as a solution. Thanks!

Imke Feldmann

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

 

View solution in original post

Highlighted
apple
Frequent Visitor

Re: Need advise to improve performance

I have 2 measures -> Totalsales= sum(sales) , Totalpurchases = sum(purchases) ,I am calculating new measure profit = sales - purchases , will writing profit = sum(sales) - sum(purchases) or profit = Totalsales -Totalpurchases is efficient or both are same as dax while calculating measures it converts the measures referred inside a measure into text format and then it will calculate

Which among those 2 approaches will be good in terms of perfromance,

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors