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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
basimretal
Frequent Visitor

How to display difference of two bars/peroids as value and % with green and red arrow indicators?

Hello,

I am trying to setup a report, and one of the requriments is to show the difference between two peroids/columns.

 

For example, is there a way to show the difference like below?

basimretal_0-1697094749972.png

 

I was thinking to have a slicer filters where you can choose which peroids you would like to compare, and based on it a scorecard will show the results. However, I am not sure about the conditional fomatting of green and red arrows coloring.

 

1 ACCEPTED SOLUTION
Uzi2019
Super User
Super User

Hi @basimretal ,
If you want create conditional formating just simply create measure like below:

Curr_value= calculate( sum(sales),dateadd( calendar[date],0,month))
Pre_value=calculate( sum(sales),dateadd( calendar[date],-1,month))


color= if([Prev_valau] > [Current_value],"Red",Green")

 

then apply to this on column condition formatting

Uzi2019_2-1697096340550.png

Uzi2019_4-1697096369418.png

or you can use this in card visual.
If you want to display arrow in card visual then use below measure:

Arrow Color = IF(prev_value<current_value,UNICHAR(128315),UNICHAR(9650))

 

Uzi2019_0-1697096715689.png

 


If my post helps you please give kudos and accept my solution!

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

View solution in original post

1 REPLY 1
Uzi2019
Super User
Super User

Hi @basimretal ,
If you want create conditional formating just simply create measure like below:

Curr_value= calculate( sum(sales),dateadd( calendar[date],0,month))
Pre_value=calculate( sum(sales),dateadd( calendar[date],-1,month))


color= if([Prev_valau] > [Current_value],"Red",Green")

 

then apply to this on column condition formatting

Uzi2019_2-1697096340550.png

Uzi2019_4-1697096369418.png

or you can use this in card visual.
If you want to display arrow in card visual then use below measure:

Arrow Color = IF(prev_value<current_value,UNICHAR(128315),UNICHAR(9650))

 

Uzi2019_0-1697096715689.png

 


If my post helps you please give kudos and accept my solution!

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.