Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

DAX Support - Switch statement - Colouring for conditional formatting

Hi all! I have hit a stumbling block in my learning. I am really struggling with the DAX coding. I am looking to colour multiple values based on specific row categories. I can manage to do it for ...
  • DataInsights's avatar
    3 years ago

    Anonymous,

     

    Try this measure:

     

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