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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
rafreis
New Member

Help with average percent changes between columns

Hi! I am having trouble creating a column showing the average percent change between 5 different column values. I am new to powerBI. So I am calculating the increment increase/decrease as ([Column1]/[Column2]-1) for subsequent columns and them dividing the sum of these increments by 5, since I have 5 different values. Somehow I am getting the right results for some rows but not for others. This is really annoying.

 

I am currently trying this: MediaCrescimentoDerivada5Dias = divide( (divide(vwPrevisaoParametros[DerivadaC+1];vwPrevisaoParametros[DerivadaC])-1) + (divide(vwPrevisaoParametros[DerivadaC+2];vwPrevisaoParametros[DerivadaC+1])-1) + (divide(vwPrevisaoParametros[DerivadaC+3];vwPrevisaoParametros[DerivadaC+2])-1) + (divide(vwPrevisaoParametros[DerivadaC+4];vwPrevisaoParametros[DerivadaC+3])-1) + (divide(vwPrevisaoParametros[DerivadaC+5];vwPrevisaoParametros[DerivadaC+4])-1);5)

 

Thanks for the help!

1 ACCEPTED SOLUTION

@rafreis , I am assuming you have done it for all the formula, try this also for all formula's

 

divide([Column1] -[Column2],[Column2],0)

 

If it does not work. Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@rafreis , use this

divide([Column1] -[Column2],[Column2])

Hi @amitchandak  thanks for your answer! Unfortunately it did not solve the problem. Still showing correct results for some rows but incorrect ones for others.

@rafreis , I am assuming you have done it for all the formula, try this also for all formula's

 

divide([Column1] -[Column2],[Column2],0)

 

If it does not work. Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.