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.
Dear BI Community,
I need help on calculating YTD value * YTD month exchange rate.
Instead of the current one I'm using, the value was mutliple by the same month exchange rate
This is the FSConso table that I'm using:
Data Type(Name) is to determine if the data is Actual or Budget
Currency is to dermine which currency to use, as FSConso includes more than 1 country.
Output Visual:
Solved! Go to Solution.
Hi @Kelvindaloo ,
Due to I don't know your data model, here I will give you some advice about measure code.
Actual =
VAR _PART1 =
CALCULATE (
SUM ( FSConso[Value] ),
FILTER ( ALL ( FSConso ), FSConso[Data Type(Name)] = "Actual" )
&& FSConso[RELATED COLUMN] = MAX ( Conversion[RELATED COLUMN] )
&& FSConso[Date] <= MAX ( FSConso[Date] )
&& FSConso[Date]
>= EOMONTH ( MAX ( FSConso[Date] ), -13 ) + 1
)
* CALCULATE (
SUM ( FSConso[Rate] ),
FILTER ( ALL ( FSConso ), FSConso[Data Type(Name)] = "Actual" )
)
VAR _PART2 =
CALCULATE ( SUM ( FSConso[Value] ), FSConso[Data Type(Name)] = "Actual" )
RETURN
IF (
CONTAINS ( Conversion, Conversion[Conversion], "Japanese Yen" ),
_PART1,
_PART2
)
If this reply still couldn't help you solve your issue, please share a sample file with me and show me a screenshot with the result you want.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
bump.. looking for some advise.
Hi @Kelvindaloo ,
Due to I don't know your data model, here I will give you some advice about measure code.
Actual =
VAR _PART1 =
CALCULATE (
SUM ( FSConso[Value] ),
FILTER ( ALL ( FSConso ), FSConso[Data Type(Name)] = "Actual" )
&& FSConso[RELATED COLUMN] = MAX ( Conversion[RELATED COLUMN] )
&& FSConso[Date] <= MAX ( FSConso[Date] )
&& FSConso[Date]
>= EOMONTH ( MAX ( FSConso[Date] ), -13 ) + 1
)
* CALCULATE (
SUM ( FSConso[Rate] ),
FILTER ( ALL ( FSConso ), FSConso[Data Type(Name)] = "Actual" )
)
VAR _PART2 =
CALCULATE ( SUM ( FSConso[Value] ), FSConso[Data Type(Name)] = "Actual" )
RETURN
IF (
CONTAINS ( Conversion, Conversion[Conversion], "Japanese Yen" ),
_PART1,
_PART2
)
If this reply still couldn't help you solve your issue, please share a sample file with me and show me a screenshot with the result you want.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is my seperate exchange rate table
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
51 | |
27 | |
24 | |
13 | |
8 |
User | Count |
---|---|
74 | |
56 | |
47 | |
16 | |
12 |