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

Calculate Translated Balance using movement data in base currency

Hi

 

I would like to calculate the closing balance and opening balance in ZAR currency from the base currencies using a DAX measure.  My current attempt wont work. Perhaps it is a syntax issue in where I multiply with the currency rate.

 

I have a row for each month and columns for the base movement amount, the closing rate and opening currency rate for the month.

 

My current attempt to calculate the closing balance at each selected date:

 

Gross Premium Debtors Close ZAR:

CALCULATE ( [Gross Premium Debtors move],

FILTER( ALL( 'SSAS V_DIM_Date'), 'SSAS V_DIM_Date'[Date] <= MAX( 'SSAS V_DIM_Date'[Date]) )

* 'SSAS V_FactPremiumCombined'[ClosingCurrencyRate]) )

 

Gross Premium Debtors move:=SUM('SSAS V_FactPremiumCombined'[GrossDebtors_MovementInclVAT])

@amitchandak 

6 REPLIES 6
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

Based on your description, I create a measure using the following sample data. Does it match the output you want?

Measure 3 = 
CALCULATE(
  SUM( 'SSAS V_FactPremiumCombined'[GrossDebtors_MovementInclVAT] ) 
  * MAX( 'SSAS V_FactPremiumCombined'[ClosingCurrencyRate] ),
  FILTER(
    'SSAS V_FactPremiumCombined', 
    'SSAS V_FactPremiumCombined'[Month] <= MAX('SSAS V_DIM_Date'[Date]) 
  )
)

 image.png

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

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

Anonymous
Not applicable

Hi, 

thank you for this. Did you not mean this in the formula (the bold below):

can you share the pbix which you created, please/

 

Gross Premium Debtors Close ZAR **bleep** move:=
CALCULATE( SUM( 'SSAS V_FactPremiumCombined'[GrossDebtors_MovementInclVAT] ) * MAX( 'SSAS V_FactPremiumCombined'[ClosingCurrencyRate] ),
FILTER( 'SSAS V_DIM_Date', 'SSAS V_DIM_Date'[ReportingDateEnd] <= MAX('SSAS V_DIM_Date'[ReportingDateEnd]) ) )

Hi @Anonymous ,

This is my PBIX file.

https://microsoftapc-my.sharepoint.com/:u:/g/personal/v-lazhang_microsoft_com/EUaGu-Cw8DpIjrIMOO_4gyQBcPFJZYYLm_eT3Yd-oGX_8g?e=NhFVOZ

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

Anonymous
Not applicable

Hi there

Please can you share the pbix file again?

I get this message

nikilouwgmail_0-1622473418643.png

 

 

Thank you so much

Hi @nikilouwgmail ,

 

This is my PBIX file.

 

Best Regards,
Winniz

Anonymous
Not applicable

Thank you so much

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.