Forum Discussion

bajimmy1983's avatar
bajimmy1983
Advocate V
8 years ago
Solved

Dynamic calculation based in two different tables

Hello again community.    I only come here when I have tried all I know and also tried to search some solution in many places. Sometimes we have a very specific challenge that needs special and foc...
  • stretcharm's avatar
    stretcharm
    8 years ago

     

    Whist not ideal you can reshap your xlsx and csv data using Query Editor/M into a better model.

    That's one of great features of powerbi you can improve source data structure as part of the refresh.

     

    " ... Don't hold year summaries on these rows. ... "??

    If have rows at monthly level/grain don't have a columns that has the current/prior yearly total. Mixing data can make your life harder as you've got to make sure your not double counting data.

    You can either aggregate the detail values or create a summary table at year level/grain.

     

     

    There are lots of posts of time intelligence here from the SQLBI boys

    https://www.sqlbi.com/topics/time-intelligence/

     

     

    " ... I would also have a row for each currency so that it's easy to filter. ... "

     

    You have BRL and EUR values on the same rows as different columns for a number of values.

    If you create a row for each Currency with a Currency code on the row you can filter and work with the values based on the selected currency. It should make your calcs simpler as they can be the same as you'll only have a single name for each money column and not need to do so many conditions. You just need to ensure you always only working on a single currency. If your main currency is BRL and you create the EUR from the exchange rate you could create a 2nd version of the detail data in Query Editor/M and append the data together Adding a new column for the Currency Code or each of the data sets.

     

    Powerbi and Tabular models work better with long lists rather than lots of columns.

     

    Ruth  ruthpozuelo at Curbal has some good videos on lots of topics. The 3 Vertipaq ones help you understand how the powerbi works so you can make it work better.

    https://www.youtube.com/watch?v=b8oSgTOeYCE

     

     

    Also take a look at this about comparison vs budgets and handling data at different grains also from the SQLBI boys.

    https://www.daxpatterns.com/budget-patterns/