cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Dynamic Conditional formatting

Hi All,

 

I have got a matrix which shows the Team member in row and months in column. the data shows the amount of work (in terms of days) allocated to team member. Is it possible to conditional format those cells where the team member has more work than the amount of working days in a month. Every month has a different number of working days 

 

My matrix visual is below. for e.g. Person F has 21.25 days of work in Sept 20  while there are only 21 working days in sept20. Can Sept 20 column be highlighted for Person F by conditional fomratting or DAx measure ?

 

Matrix - Team MemberMatrix - Team MemberWorking Days in MonthWorking Days in Month

 

Thank you

 

Chinmay 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi, @Chinmay 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

b1.png

 

You may create a measure as below.

Visual Color = 
var _date = SELECTEDVALUE('Table'[Date])
return
IF(
    SELECTEDVALUE('Table'[Person])="F"&&
    MONTH(_date)=9&&YEAR(_date)=2020,
    "Green"
)

 

Then you need to go to 'Visualizations'=>'Conditional formatting'=>'Background color', set as below.

b2.png

 

b3.png

 

Result:

b4.png

 

Best Regards

Allan

 

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

2 REPLIES 2
Super User IV
Super User IV

@Chinmay ,

you can create a color measure and use that in conditional formatting using "Field Value" Option

 

example

color =
switch ( true(),
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity1" && sum('Table'[Value]) >500,"lightgreen",
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity2" && sum('Table'[Value]) >1000,"lightgreen",
// Add more conditions
"red"
)

 

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Community Support
Community Support

Hi, @Chinmay 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

b1.png

 

You may create a measure as below.

Visual Color = 
var _date = SELECTEDVALUE('Table'[Date])
return
IF(
    SELECTEDVALUE('Table'[Person])="F"&&
    MONTH(_date)=9&&YEAR(_date)=2020,
    "Green"
)

 

Then you need to go to 'Visualizations'=>'Conditional formatting'=>'Background color', set as below.

b2.png

 

b3.png

 

Result:

b4.png

 

Best Regards

Allan

 

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors