Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Dorinda
Frequent Visitor

Conditional Formatting based on two conditions

 

good morning, I need help in my power bi report to have a conditional formating that applies when two things happen. 1. If the Access right in dataverse shows as Organization which i have under a measure below

 

Access Level Text = 
SWITCH(
    'RolePrivileges'[privilegedepthmask],
    8, "Organization",
    4, "Parent: Child Business Units",
    2, "Business Unit",
    1, "User",
    0, "None"
)

 

and
2. If the Role Privilege is contains any of the following in the description
Attachment
Note
Mail

I cannot use the ootb conditional formating so we will need to have the ability to use a measure to accomplish this.

Additionally, I would like a slice that would act like a toggle to turn off or on the conditional formatting measure in powerbi

Dorinda_1-1713194351664.png

I keep getting an "OLE DB or ODBC error" when I try to apply it.

 

Any help would be appreciated.

 

1 ACCEPTED SOLUTION
ray_aramburo
Super User
Super User

I would recommend doing this in Power Query. Create first a conditional column for your first case (Access Level Text). Then you can create a custom column to combine the logic with those results and Text.Contains (see documentation here). The outcome to place in each clause will depend on you, you can directly add a hex code to represent a color or you can even show characters (see how here ). 

Regarding your second question, you can achieve it through bookmarks: create 2 visuals: one with the conditional formatting and one without it. Then show one visual and hide the other and save this state in a bookmark, then do viceversa to capture the other state. 





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
ray_aramburo
Super User
Super User

I would recommend doing this in Power Query. Create first a conditional column for your first case (Access Level Text). Then you can create a custom column to combine the logic with those results and Text.Contains (see documentation here). The outcome to place in each clause will depend on you, you can directly add a hex code to represent a color or you can even show characters (see how here ). 

Regarding your second question, you can achieve it through bookmarks: create 2 visuals: one with the conditional formatting and one without it. Then show one visual and hide the other and save this state in a bookmark, then do viceversa to capture the other state. 





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.