Forum Discussion
Dynamic calculation based in two different tables
- 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/
MyMeasure = [Based LY Realized Act Bil] - [Billing Pilot Evolution %] ?
- bajimmy19838 years agoAdvocate V
Hi Greg_Deckler, thanks for your suggestion, but didn't work. Please see attached pic.
Greg's suggestion
- stretcharm8 years agoMemorable Member
I think the problem is down to precision. with Pilot Base 4 I see the PilotImpact EUR as 5.82672036%.
You can round the figure to get a match with the manual 5.83
Based LY Realized Obj Bil _PilotEvoImpact EUR ### WRONG ### = CALCULATE ( SUM ( MiddleOffice[BILLING EUR] ), ALL ( 'Date'[Year] ), SAMEPERIODLASTYEAR ( 'Date'[Date] ) ) - CALCULATE ( SUM ( MiddleOffice[BILLING EUR] ), ALL ( 'Date'[Year] ), SAMEPERIODLASTYEAR ( 'Date'[Date] ) ) * ROUND([PilotImpact EUR],4)- bajimmy19838 years agoAdvocate VHi stretchable! Thanks for your reply. After dinner I will validate it and check the result. If ok I mark as the solution. I confess I forgot to round up.