Forum Discussion

sshiny's avatar
sshiny
Helper II
4 years ago
Solved

Matrix-Column colour

Is it possible to give, all the sub-columns under April in a particular colour, May in a particular colour and June in a particular colour?

 

  • Dinesh The above measure dint work, however the below measure worked for me-

    Color =
    var Month_Name = SELECTEDVALUE('Tag Usage Fact'[Month Name])
    return
    SWITCH(true(), Month_Name = "April", "Green",
    Month_Name = "May", "Red",
    Month_Name = "Proc Total", "Red",
    Month_Name = "Average", "Red",
    Month_Name = "June", "Purple")

2 Replies

  • Dinesh The above measure dint work, however the below measure worked for me-

    Color =
    var Month_Name = SELECTEDVALUE('Tag Usage Fact'[Month Name])
    return
    SWITCH(true(), Month_Name = "April", "Green",
    Month_Name = "May", "Red",
    Month_Name = "Proc Total", "Red",
    Month_Name = "Average", "Red",
    Month_Name = "June", "Purple")
  • Dinesh_Suranga's avatar
    Dinesh_Suranga
    Continued Contributor

    Hi sshiny ,

    Please create the following measure and add that to background colour in conditional formatting.

    Colour  =
    // Table name is the table which available month names column and column name is he column which available month names
    VAR SelectedMonth= Selectedvalue(Tablename[Columnname])

    RETURN
    SWITCH(SelectedMonth),
    "April" , "blue",
    "May" , "green",
    "July" , "black",
    "white"
    )
    Thank you.