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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Power BI SUM Anomaly

Hi everyone,

 

I have a table with financial data about projects, and those are in local currencies. I also have a table with hystorical fx rates so i wanted to create a posibility for the user to see the financial data in a visualization but also be able to choose what rate should the conversion be made at. So what i did: i created a table with distinct currency codes that acts as intermediary for the financial data table and fx rates table, so both of them have relationship with this table. Next step: create a measure that is SUM of the fx rates from the fx rates table, create a measure that is SUM of the metric i want to see in USD. Then a new measure (metric_USD) that is SUM(fxrates)*SUM(metric).

So when i create a visualization i can attach a slicer to it and if i select only one period (from the FX rates table), it will multiply my metric with the rate from that period.

 

But the strange thing is that for some metrics it works correctly (aside the subtotals, that are tottaly dumb random numbers, i don't know how they are calculated), and for some, it just adds up more and more with every period increase, so the final numbers are way to big.

 

What could be the cause of this?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

You proabably have a join issue. I would suggest adding date to your primary key like you have in your foreign key.

 

Jared

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

You should try creating a column and then use the sum

 

metric_USD= fxrates*metric

As they are in a different table. You might have to create a column to bring the fx rate from another table.

 

Anonymous
Not applicable

@amitchandak If i bring the fx rates to the main financial data table I wouldn't be able to use the slicer anymore, as it permits me to select the period for the rate to be used in the conversion.

Can you share a sample pbix, after removing sensitive information?

Anonymous
Not applicable

Well, the problem actually is based on sensitive data, and 90% of the pbix is sensitive data....any other hint that I can give you ? Maybe how te relationships are made ?

Can you add a sample rate table for a few days and share back with the formula you are trying to create.

https://www.dropbox.com/s/unfqa025ca7p3vw/CompareRange_timedim.pbix?dl=0

 

Use sales as the amount you want to convert.

Anonymous
Not applicable

You proabably have a join issue. I would suggest adding date to your primary key like you have in your foreign key.

 

Jared

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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