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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
alexjoukova
New Member

Conditionally formatting A LOT of text columns

Hello,
Please help me to create conditional formatting for multiple text columns. I understand that I can format them by creating a separate measure for each column, which I started doing, but this will take too long.
Currently this is what I have:

Status color Column_1=
var selected_status = SELECTEDVALUE(Table[Column_1])
return
if(selected_status= "CLOSED", "#FF0000",
    if(selected_status="YES", "#F4D03F",
        if(selected_status="NO", "#D5D8DC", "#FDFEFE")))

Status color Column_2=
var selected_status = SELECTEDVALUE(Table[Column_2])
return
if(selected_status= "CLOSED", "#FF0000",
    if(selected_status="YES", "#F4D03F",
        if(selected_status="NO", "#D5D8DC", "#FDFEFE")))

etc.

But I have almost 50 columns, I don't want to manually create 50 measures, and to apply each specific measure to each specific column.
How can I apply this conditional formatting logic to ALL of the 50 text columns

Thanks
1 REPLY 1
lbendlin
Super User
Super User

Put all your columns in a Field Parameter.  Apply the conditional formatting once.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors