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

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.

Reply
rosana
Regular Visitor

Comparison of two columns in percentage

Hi everyone,

 

I am getting stuck in solving my small issue, which is visualizing the difference between two different data in percentage. In this specific case in the screnshoot I am comparing only the years 2021 and 2022. However, my database is since 2008.

 

My goal here is to get the values in percentage comparing two different years in this column "Gesamt". How could I do that? Rememebring that my database contains data from year 2008 to 2024

 

rosana_0-1661173095376.png

 

And that's how I want to visualize the data.

 

rosana_1-1661173179256.png

 

Thank you in advance. 😃

 

 

1 ACCEPTED SOLUTION
v-yadongf-msft
Community Support
Community Support

Hi @rosana ,

 

Please create a new column:

+/- % = [Y2021]-[Y2020]

 

Then create a new measure:

color = IF(MAX('Sheet4'[+/- %])<0,"#FF0000","#7CFC00")

 

Select “Conditional formatting” - “Font color”.

vyadongfmsft_0-1661420835320.png

 

In font color page, select “Field value” and “color” measure.

vyadongfmsft_1-1661420835323.png

Then you can get result you want.

vyadongfmsft_2-1661420835325.png

Best regards,

Yadong Fang

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-yadongf-msft
Community Support
Community Support

Hi @rosana ,

 

Please create a new column:

+/- % = [Y2021]-[Y2020]

 

Then create a new measure:

color = IF(MAX('Sheet4'[+/- %])<0,"#FF0000","#7CFC00")

 

Select “Conditional formatting” - “Font color”.

vyadongfmsft_0-1661420835320.png

 

In font color page, select “Field value” and “color” measure.

vyadongfmsft_1-1661420835323.png

Then you can get result you want.

vyadongfmsft_2-1661420835325.png

Best regards,

Yadong Fang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

gauthamboppana
Solution Specialist
Solution Specialist

@rosana  - Please check the below links for solutions. You will have to tailor the dataset and measures accordingly. Hope this helps !

https://community.powerbi.com/t5/Desktop/Percentage-change-across-matrix/m-p/210181

https://community.powerbi.com/t5/Desktop/How-to-calculate-percentage-change-between-two-dates/m-p/49...

Did I answer your question? Mark my post as a solution! If not, please feel free to ask me.

Also, I would ❤ Kudos if my solution helped.  It is a token of appreciation!

Thank you very much !

 

collinq
Super User
Super User

Hi @rosana ,

 

You might want to ask the question in the Dax/Developer area but the process would probably be to create a year over year percentage measure.  (There may even be a quick measure for that ) and then the measure would compare any two sequential years.




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors