cancel
Showing results for 
Search instead for 
Did you mean: 
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]))

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
!! Subscribe to my youtube Channel !!

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]))

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
!! Subscribe to my youtube Channel !!

Helpful resources

Announcements
May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

Power BI Dev Camp Session 22 with aka link 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!