Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Matrix table conditional formatting based on category and value - Dax coding?

Hi there, 

 

I am at the final stage of my dashboard and I'm struggling to create conditional formatting based on multiple parameters and could really do with some help please.

I have attached a mocked up table of how my table appears. I am looking to create conditional formatting based on Grade and the specific value based on utilisation expectations for that grade. I've chosen to use mock data just to represent the data and not risk any issues with data protection/GDPR.

 

Grade expecations:
Director: 50+ Green, 40-50 Amber, <40 Red
Senior Manager: 65+ Green, 55-65 Amber, <55 Red

Manager, Senior Associate and Associate: 75+ Green, 65-75 Amber, <65 Red

 

(Merged cells were taken out when this was posted. For reference, there is a PW, P4W and YTD column under each grade. Sorry!)

Grade1 Director2 Senior Manager3 Manager4 Senior Associate5 Associate
LoSPWP4WYTDPWP4WYTDPWP4WYTDPWP4WYTDPWP4WYTD
X405060807580659070605090704080
Y505060607065807580806080906050
Z2040704045707080759070601008560

 


Thank you so much in advance!

Screen snip of example table:



I've used this DAX expression for a matrix table in a different dashboard, was wondering if this could be repurposed?

Colour by category =
   SWITCH (TRUE (),
     MAX('TL Forecast Bookings'[Booking Type]) = "Chargeable""LightGreen",
     MAX('TL Forecast Bookings'[Booking Type]) = "Provisional/Reserved""Orange",
     MAX('TL Forecast Bookings'[Booking Type]) = "Vacation/Holiday""Yellow",
     MAX('TL Forecast Bookings'[Booking Type]) = "Training/Exams""Violet",
     MAX('TL Forecast Bookings'[Booking Type]) = "Non Chargeable""DodgerBlue",
     MAX('TL Forecast Bookings'[Booking Type]) = "Internal Project""DodgerBlue"
)

5 Replies