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
ys034
Helper I
Helper I

Currency calculation for last year between two tables

Hello Community,

 

I have the following problem and namely I want for last year the sales in the correctly converted currency eg. Pound to Euro for Great Britain
For the current year it works through a calculated column. Does anyone have an idea for this issue?

 

ys034_0-1642773184408.png

 

 

My Measures:

Total Sales LC = SUM('DataTable'[Total Sales Local Currency])
Total Sales LC LY = CALCULATE(SUM('DataTable'[Total Sales Local Currency]),SAMEPERIODLASTYEAR('DateTable'[Date]))
 
Calculated Column: 
Total Sales EUR = [Total Sales LC] / RELATED('Currency Table'[Exchange Rate])
Total Sales EUR LY = [Total Sales LC LY] / RELATED('Currency Table'[Exchange Rate]) (info: a circular dependency was detected)
 
My Model:
 
ys034_1-1642773577118.png

 

thank you in advance

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ys034 , You should not create a column on measure. You should now create a measure only

 

something like

Total Sales LC Curr = SUMX('DataTable', 'DataTable'[Total Sales Local Currency]/ RELATED('Currency Table'[Exchange Rate]))

 

Total Sales LC Curr LY = CALCULATE(SUMX('DataTable', 'DataTable'[Total Sales Local Currency]/ RELATED('Currency Table'[Exchange Rate])),SAMEPERIODLASTYEAR('DateTable'[Date]))

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@ys034 , You should not create a column on measure. You should now create a measure only

 

something like

Total Sales LC Curr = SUMX('DataTable', 'DataTable'[Total Sales Local Currency]/ RELATED('Currency Table'[Exchange Rate]))

 

Total Sales LC Curr LY = CALCULATE(SUMX('DataTable', 'DataTable'[Total Sales Local Currency]/ RELATED('Currency Table'[Exchange Rate])),SAMEPERIODLASTYEAR('DateTable'[Date]))

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.

Top Solution Authors