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

Fx rate from another table does not calculate right

Hi community

I need your help one more time. 

 

I have a report with one table that looks like the below:

InstrumentUsed
 1,000
EUR3,500
USD1,700
SGD600
 2,000

 

Another table (fictive rate)

CurrencyFx rate from EUR
USD1
SGD0.5

 

So what I want to have a new column in the first table that gives the amount converted into EUR except when instrument is blank or EUR.

 

I have made a relationship between the 2 tables with Instrument linked to Currency. 

 

When calculating the new column I have tried:

Nw column = Sum('Table1'[Used])*Sum('Table2'[Fx rate from EUR])

 

But doesn't work. 🙄

 

I missed something most probably. 

 

If you can help would be really appreciated. 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @TheBaz_57 ,

Here are the steps you can follow:

1. Create calculated column.

Nw column =
var _fx=CALCULATE(SUM('Table2'[Fx rate from EUR]),FILTER(ALL(Table2),'Table2'[Currency]=EARLIER('Table1'[Instrument])))
return
'Table1'[Used] * _fx

2. Result:

vyangliumsft_0-1655429774662.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
v-yangliu-msft
Community Support
Community Support

Hi  @TheBaz_57 ,

Here are the steps you can follow:

1. Create calculated column.

Nw column =
var _fx=CALCULATE(SUM('Table2'[Fx rate from EUR]),FILTER(ALL(Table2),'Table2'[Currency]=EARLIER('Table1'[Instrument])))
return
'Table1'[Used] * _fx

2. Result:

vyangliumsft_0-1655429774662.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

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.