Forum Discussion

KrishnaPrasad23's avatar
KrishnaPrasad23
Regular Visitor
4 months ago
Solved

Conditional Formatting while drag and drop the column

Hello,

 

When we drag and drop the column from tables, the conditional formatting will have to work from the Measures or Column value.

Typically, conditional formatting will work when we make the changes by click the conditional formatting – Background color in the column.  Here, the requirement when we use visual tables, it we just drag and drop the column2, when the price is equal to or more than 170 it should be green and below or equals 100 it should be red. Anywhere between 170 to 100 it’s yellow

Please help with this requirement. I tried the switch function, but it’s not changing and manually made me complete when we do conditional formatting from the visual level.

 


ProductColumn2

Apple100
Orange200
Grapes150
Pineapple50
Banana170



Column2 Color =
SWITCH (
    TRUE(),
    SELECTEDVALUE ( 'Table'[Column2] ) < 100, "#FF0000",       -- Red
    SELECTEDVALUE ( 'Table'[Column2]  ) <= 150, "#FFA500",     -- Orange
    "#00B050"                                                    -- Green
)

 

 

 

  • This is not possible in Power BI. There is no mechanism that automatically applies conditional formatting when a column is dragged into a table visual. The "fx" wiring step in the Format pane is always required, and it is a one-time manual setup per column per visual.

  • ryan_mayu's avatar
    ryan_mayu
    4 months ago

    KrishnaPrasad23 

    I don't think you can do that. That's not the correct steps in Powerbi. In Powerbi, 1st drag out the column to the table, 2nd, set the conditional formatting.

7 Replies

    • KrishnaPrasad23's avatar
      KrishnaPrasad23
      Regular Visitor

      Hello ryan_mayu,
      Good day!!!

      Thank you for the dax!!!
      Once we created the dax we go to conditional formatting and selecting the fields to change the colors of the background. 
      Here the requirement is, when we drag the column the color should be available. We dont need to make the background changes by selecting the field. 
      can you help on this.

      • ryan_mayu's avatar
        ryan_mayu
        Super User

        does that mean you will change the column to other columns?

        I think we build the table first, then set up the conditional formatting. If you didn't drag out the column , I don't think we can set up the conditional formatting.

        If I misunderstood, pls clarify your requirements and update the expected output.

  • This is not possible in Power BI. There is no mechanism that automatically applies conditional formatting when a column is dragged into a table visual. The "fx" wiring step in the Format pane is always required, and it is a one-time manual setup per column per visual.

  • v-priyankata's avatar
    v-priyankata
    Community Support

    Hi KrishnaPrasad23 

    Thank you for reaching out to the Microsoft Fabric Forum Community.

    cengizhanarslan ryan_mayu Thanks for the inputs.

    I hope the information provided by users was helpful. If you still have questions, please don't hesitate to reach out to the community.