Forum Discussion
NB3
Helper III
7 years agoCalculate percentage evolution between two tables
Hey guys, I'm trying to calcultate the percentage evolution between two tables and can't figure out a DAX formula to make this work ... Let's just say I have a 2018 table and a 2019 table. Ea...
- 7 years ago
Hi NB3 ,
Assuming that you have two tables in Power BI then you could create the calculated column below in Table 2019.
Column = VAR a = LOOKUPVALUE ( '2018'[Value], '2018'[Date].[MonthNo], MONTH ( '2019'[Date] ) ) RETURN IF ( ISBLANK ( '2019'[Value] ), BLANK (), DIVIDE ( '2019'[Value] - a, a ) )Here is my test result.
More details, please refer to my attachement.
If you still need help, feel free to ask.
Best Regards,
Cherry
NB3
Helper III
7 years agoHI v-piga-msft
Here is an example of what I want exactly.
The result I want is what's highlighted with the formula being the one on top. I just can't find how to make this work in Power BI ...
Thanks,
Nick
v-piga-msft
Resident Rockstar
7 years agoHi NB3 ,
Assuming that you have two tables in Power BI then you could create the calculated column below in Table 2019.
Column =
VAR a =
LOOKUPVALUE ( '2018'[Value], '2018'[Date].[MonthNo], MONTH ( '2019'[Date] ) )
RETURN
IF ( ISBLANK ( '2019'[Value] ), BLANK (), DIVIDE ( '2019'[Value] - a, a ) )
Here is my test result.
More details, please refer to my attachement.
If you still need help, feel free to ask.
Best Regards,
Cherry