Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi eveyrone,
I have a business case for which I need to calculate the YTD amount of the difference between YTD and YTD of prior period (YTD and YTD prior period are multiplied by different exchange rate).
However, when I calculate the YTD of my difference, nothing is agregated.
Does someone have a clue about how to calculate the YTD of YTD measures ?
Thanks for your help !
Solved! Go to Solution.
Hi @RLBGA ,
According to your description, I create a sample.
Here's my solution, create three measures.
YTD =
CALCULATE ( SUM ( 'Table'[Amount] ), DATESYTD ( 'Table'[Date] ) )
* MAX ( 'Table'[Exchange Rate] )
Diff =
VAR _Pre =
CALCULATE ( [YTD], PREVIOUSMONTH ( 'Table'[Date] ) )
RETURN
IF ( _Pre = BLANK (), BLANK (), [YTD] - _Pre )
Diff YTD =
SUMX ( DATESYTD ( 'Table'[Date] ), 'Table'[Diff] )
Get the correct result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @RLBGA ,
According to your description, I create a sample.
Here's my solution, create three measures.
YTD =
CALCULATE ( SUM ( 'Table'[Amount] ), DATESYTD ( 'Table'[Date] ) )
* MAX ( 'Table'[Exchange Rate] )
Diff =
VAR _Pre =
CALCULATE ( [YTD], PREVIOUSMONTH ( 'Table'[Date] ) )
RETURN
IF ( _Pre = BLANK (), BLANK (), [YTD] - _Pre )
Diff YTD =
SUMX ( DATESYTD ( 'Table'[Date] ), 'Table'[Diff] )
Get the correct result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@amitchandak thanks for your answer.
Please find below more precisions about my need.
1. For each month, I calculate the YTD amount and I multiply it by the exchange rate of the current month.
2. I calculate the difference between current YTD amount (multiplied by current month exchange rate) and the YTD of the prior month (multiplied by prior month exchange rate)
3. Once the difference is calculated (so I have one amount calculated by month), I want to calculate the YTD of that difference by month.
The steps 1 and 2 are well calculated : I have my difference of two YTD value calculated by month. However, there is blocking point on the level 3 : I'm not able to sum on a YTD basis that difference calculated by month.
@RLBGA , Not very clear,
If you simply need last year then you can have like
Year behind Sales = CALCULATE([YTD],SAMEPERIODLASTYEAR('Date'[Date]))
Up - Still not solved