cancel
Showing results for
Did you mean:
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?

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:

1 ACCEPTED SOLUTION
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]))

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

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 !!

Announcements

#### The Power BI Community Show

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

#### Charticulator Design Challenge

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

#### Check it out!

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