Forum Discussion

Girts's avatar
Girts
Frequent Visitor
8 years ago
Solved

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

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    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

    • apple's avatar
      apple
      Frequent Visitor

      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,

  • Girts's avatar
    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.