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.
Greetings,
I'm looking to calculate the % difference of change of a exchange rate between dates.
My table structure is the following:
Is it possible to calculate the % change between each row in a structure of this kind in Power BI?
I have tried this for one single column and have been unfortunately unable to figure this out. Here's my measure I created:
Solved! Go to Solution.
Hi @nnouchi,
Please try this measure:
% diff = VAR currentmonthval = SUM ( 'Currency rates'[Value.CAD] ) VAR previousmonthval = CALCULATE ( SUM ( 'Currency rates'[Value.CAD] ), FILTER ( ALLSELECTED ( 'Currency rates'[Dates] ), MONTH ( 'Currency rates'[Dates] ) = MONTH ( MAX ( 'Currency rates'[Dates] ) ) - 1 ) ) RETURN DIVIDE ( currentmonthval - previousmonthval, currentmonthval )
Best regards,
Yuliana Gu
Hi @nnouchi,
Please try this measure:
% diff = VAR currentmonthval = SUM ( 'Currency rates'[Value.CAD] ) VAR previousmonthval = CALCULATE ( SUM ( 'Currency rates'[Value.CAD] ), FILTER ( ALLSELECTED ( 'Currency rates'[Dates] ), MONTH ( 'Currency rates'[Dates] ) = MONTH ( MAX ( 'Currency rates'[Dates] ) ) - 1 ) ) RETURN DIVIDE ( currentmonthval - previousmonthval, currentmonthval )
Best regards,
Yuliana Gu
Thank you, this is exactly what I was looking to accomplish.
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 |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |