Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
NB3
Helper III
Helper III

Calculate 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. Each row represents a month (Jan-Feb-Mar-etc) and I'd like to calculate the % evolution for each month (so each row).

 

What would be the DAX formula to make this work ?

 

Thanks,

 

Nick

1 ACCEPTED SOLUTION

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.

Capture.PNG

More details, please refer to my attachement.

If you still need help, feel free to ask.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @NB3 ,

If it is convenient, could you share the data sample which could reproduce your scenario and your desired output so that we could help further on it?

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

HI @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

 

Capture.PNG

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.

Capture.PNG

More details, please refer to my attachement.

If you still need help, feel free to ask.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.