Forum Discussion

14 Replies

    • Whibley92's avatar
      Whibley92
      Icon for Helper II rankHelper II

      I want the different segments of each column broken down into different colours when selected on the slicer, not block. 

      • saud968's avatar
        saud968
        Icon for Memorable Member rankMemorable Member

        Can you share a sample data with google drive and any other link, it would be great...remove all sensitive data

  • Hello, is the classification of the segmentation the same as the legend of the chart? That is, each of the sections of the stacked bar is a category of the state? If so, simply by clicking on the graphic and clicking on 'Format your visual' in the 'Visualizations' section you will find the 'Columns' option and in 'Series' you can click on each of them and modify their color, which appears just below.

  • saud968's avatar
    saud968
    Icon for Memorable Member rankMemorable Member

    You can go to the format pane, then go to columns click on fx, and then set rules accordingly.

     

     

    Further, you can also create a custom column
    Color = SWITCH(
    MyTable[Status],
    "completed", "green",
    "incomplete", "red",
    "pending", "amber",
    "unknown" // Default color for any other status
    )

    Best Regards

    Saud Ansari

    If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!

    • saud968's avatar
      saud968
      Icon for Memorable Member rankMemorable Member

      These statuses are columns or measures. Also, the fx option you have to review other options and also did you try the custom column Dax
      Below is another measure you can try

      Color Measure =
      SWITCH(
      SELECTEDVALUE('SlicerTable'[Category]),
      "Completed", "#00FF00", --Green
      "Incomplete", "#FF0000", -- Red
      "Pending", "#FFA500" -- Amber
      )

      Apply to Chart:
      Go to the "Format" tab of your chart.
      Select "Data colors" -> "fx"
      Select the newly created "Color Measure."

       

      Best Regards
      Saud Ansari
      If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!



  • I know why, sorry. The slicer doesnt break down the data in the chart when you click on it so I used a table. 

     So I have to use a slicer to get the colours but then it just does:

     

     

    • saud968's avatar
      saud968
      Icon for Memorable Member rankMemorable Member

      Have you tried this

      Color Measure =
      SWITCH(
      SELECTEDVALUE('SlicerTable'[Category]),
      "Completed", "#00FF00", --Green
      "Incomplete", "#FF0000", -- Red
      "Pending", "#FFA500" -- Amber
      )

      Apply to Chart:
      Go to the "Format" tab of your chart.
      Select "Data colors" -> "fx"
      Select the newly created "Color Measure."

       

      Best Regards
      Saud Ansari
      If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!

       

      • Whibley92's avatar
        Whibley92
        Icon for Helper II rankHelper II

        Yes I did, it just keeps them blue. I'm very new to Power BI so its probably really easy to do. Any advice on where I may be going wrong? 

        Color Measure =
        SWITCH(
        SELECTEDVALUE('Learning Item Status report'[Status Overall]),
        "Completed", "#5DDA7E", --Green
        "Incomplete", "#F43232", -- Red
        "Pending", "#F08439" -- Amber
        )