Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

Color one specific column

Hello,

 

i have a matrix and i'll like to color this one column, because, left of this column are current values, right of this column are planed values. the column itself contains the forecast für the depending year i.a. 2018. the value itself is a measure and calculates current/plan or forecast in one measure, depending on the years/month (columns) and accounts (rows) come out of tabular model.

We want to drill down the columns and the rows.

 

Ist this possible in Power Bi Dekstop [march 2018] to color one specific column?

14 Replies

  • v-juanli-msft's avatar
    v-juanli-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous

    With Field formatting for matrix, you can color one specific column. (this can be achieved in Power Bi Dekstop [march 2018])

    With conditional formatting for matrix, you can specify customized cell colors based on cell values, or based on other values or fields.  (this need to update to Power Bi Dekstop [may 2018])

     

    Best Regards

    Maggie

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Meggie,

       

      yes this works on one column, if you have one column or different Measures.

      But, if you have a matrix, with a hole lot of columns with only one Measure, it dosn't work.

      If you try Field formatting or conditional formatting, it will formate the hole table, because it works on the measure not the column.

      But we only want to formate 2018, 2015 and 2021 in light grey, these are columns with cumulated values or forecast.

      And if i add a second or third measure for cumulated or forecast, we will have more than one column per year, this is not aceptable, i explain:

       

      Of course, we will drill down first to years (2015 will go to 1995 to 2015 and 2021+ will go to 2021 to 2034) and next we will drill down the Years to Months, so in the end of day, we have countless columns with three measures.

      So we put together the three measures in one to display it.

       

      That's my Problem. 

       

      I forget, there is one more, small, restriction: We work on Live connection to Tabluar Model (too many values for Power BI ->Loadtime) , no way to add a calculated Column or Table in Power BI Desktop.

       

      Example: Out Matrix looks like this:

       

      And here you see the Drill-Down to Months

       

      Works Power BI Desktop [may 2018] with the Power Bi Server?

       

      Thanks for your help

      Katja

      • v-juanli-msft's avatar
        v-juanli-msft
        Icon for Community Support rankCommunity Support

        Hi Anonymous

        with May 2018, I can color specific columns

         

        Best Regards

        Maggie

    • magtal_pbi's avatar
      magtal_pbi
      New Member

      For Field formatting menu I have download latest PBI (May 2022) desktop but still not available, do this feature require Pro license?

    • guh950's avatar
      guh950
      Icon for Microsoft Employee rankMicrosoft Employee

      My problem is I'm trying to color code multiple columns, and they're based on measures. This is a very good thing to know if I want to color one column, however!

  • Anonymous's avatar
    Anonymous
    Not applicable

    You're able to color whole columns with Measures.

    You have to set a measure as the background for the values in your matrix. Then you have to create the code in the measure, for example:

    ColorColumns =
    var _val = SELECTEDVALUE(nameoftable[nameofcolumn])

    return SWITCH(_val, "forecast1", "#ff9933", "#ffffff")

     

    In this example every value forecast1 in the column would be colored orange, and everything else white

    • guh950's avatar
      guh950
      Icon for Microsoft Employee rankMicrosoft Employee

      This looks good, but how would I set a measure to color code for another measure column in a matrix?