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
Anonymous
Not applicable

Conditional Formatting

Hello,

 

Thought this would be easy, but couldn't get done. Is there a way to do this :

Sales data - Actual and Plan is currently stored in database as below :

MonthActualPlan
01/01/202110001500
02/01/2021800750
03/01/2021900800

 

We are looking for a Matrix in Power BI that displays as below :

If the Actual is lesser than Plan, then should be displayed in Red or else in Green

 01/01/202102/01/202103/01/2021
Actual1000800900
Plan1500750800
5 REPLIES 5
VijayP
Super User
Super User

@Anonymous 

You need to aggregate Actual and Plan and compare with each other

IF(Sum(Actual)<Sum(Budget),"Red","Green") should work.

Let me know if any assistance required




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Anonymous
Not applicable

Thank you @EVIJ !

Actually, it looked bit more complicated, may be I should have explained more. Thanks for the suggestion !!

Angith_Nair
Helper V
Helper V

Hi @Anonymous 

Try with this measure and in conditional formatting use this measure as a field value..

 

 

Measure = 
IF( SELECTEDVALUE('Table'[Actual]) < SELECTEDVALUE('Table'[Plan]), "#d40d1a", "#0dd42b")

 

 

It will look something like this..

Angith_Nair_0-1616687571209.png

If this helps, kindly mark it as a solution. Appreciate with Kuddos.

 

 

Anonymous
Not applicable

Thank you Angith !

But, the catch is, the Actual and Plan should be displayed as rows and not columns. They must be pivoted. Can this be still achieved ?

I am not sure about this. @amitchandak sir, is this can be achieved..?

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.