Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi ,
I have a table with few columns out it couple of columns need to have background color based on condition. Sample data in the table is as below. Pls guide me how can we add multiple conditions
Color coding
Expected result - color coding will be based on the status color defined above and background color should be added where a text is found in Remarks column & rest will be no-color
Solved! Go to Solution.
Hi @manojk_pbi ,
I created a sample pbix file(see the attachment), please check if that is what you want.
1. Create a measure as below
Conditional formatting =
VAR _remark =
SELECTEDVALUE ( 'Table'[Remarks] )
VAR _status =
SELECTEDVALUE ( 'Table'[Status] )
RETURN
SWITCH (
TRUE (),
_remark <> BLANK ()
&& _status = "In-Progress", "Yellow",
_remark <> BLANK ()
&& _status = "Active", "Blue",
_remark <> BLANK ()
&& _status = "Resolved", "#89D26B",
_remark <> BLANK ()
&& _status = "New", "Grey",
_remark <> BLANK ()
&& _status = "Closed", "Green"
)
2. Apply conditional formatting
Apply conditional table formatting in Power BI - Power BI | Microsoft Learn
Best Regards
Hello @manojk_pbi , remember to adhere to the decorum of the Community Forum when asking a question.
Please provide your work-in-progress Power BI Desktop file (with sensitive information removed) that covers your issue or question completely in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.
Attached the sample data. The required out is to just fill the background for Remarks column based on 2 conditions. First condition is Remarks should not be blank or empty and then apply color code based on the status.
Task | Status | Remarks | Trend | Date |
T1 | In-Progress | waiting | Increasing | 24-Jan |
T2 | Active | Increasing | 24-Jan | |
T3 | Resolved | in Tetsing | decreasing | 24-Jan |
T4 | New | decreasing | 24-Jan | |
T5 | Closed | issue fixed | decreasing | 24-Jan |
Hi @manojk_pbi ,
I created a sample pbix file(see the attachment), please check if that is what you want.
1. Create a measure as below
Conditional formatting =
VAR _remark =
SELECTEDVALUE ( 'Table'[Remarks] )
VAR _status =
SELECTEDVALUE ( 'Table'[Status] )
RETURN
SWITCH (
TRUE (),
_remark <> BLANK ()
&& _status = "In-Progress", "Yellow",
_remark <> BLANK ()
&& _status = "Active", "Blue",
_remark <> BLANK ()
&& _status = "Resolved", "#89D26B",
_remark <> BLANK ()
&& _status = "New", "Grey",
_remark <> BLANK ()
&& _status = "Closed", "Green"
)
2. Apply conditional formatting
Apply conditional table formatting in Power BI - Power BI | Microsoft Learn
Best Regards
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
4 | |
3 | |
3 | |
3 | |
3 |