Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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

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).

Imke Feldmann (The BIccountant)

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

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
Girts
Frequent Visitor

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. 

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).

Imke Feldmann (The BIccountant)

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

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

ImkeF
Super User
Super User

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

Imke Feldmann (The BIccountant)

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

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

v-shex-msft
Community Support
Community Support

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
If this post helps, please consider accept as solution to help other members find it more quickly.

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.