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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
samjcarroll
Regular Visitor

Conditional Formatting for Clustered Column Chart Based Off Current User Viewing the Report

I am trying to figure out a way to create a clustered column chart with conditional formatting. The data compares a few metrics across several users of the report. I want the current user's columns to be saturated colors and the other user's data to be desaturated and lightened. See the below example from Excel.

 

samjcarroll_0-1715625042122.png

Anyone know of a way to accomplish this in Power BI so that it is dynamic based on which user is viewing the report?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @samjcarroll ,

Regarding your question, you can achieve your goal by using the 'USERPRINCIPALNAME()' function in conjunction with conditional formatting.First ensure that the data stores the email address used by the user to log in to Power BI Service.

vzhouwenmsft_0-1715652273479.png

Use the following DAX expression to create a measure(1 for opaque, 0.3 for 30% transparent)

 

Measure = 
VAR _a = USERPRINCIPALNAME()
VAR _b = SELECTEDVALUE('Table'[Email])
RETURN IF( _b = _a,"rgba(0,0,200,1)","rgba(0,0,200,0.3)")

 

Setting the Conditional Format

vzhouwenmsft_1-1715652979093.png

vzhouwenmsft_2-1715652996405.png

If you have multiple columns on the x-axis, setting the conditional format is not supported and it is recommended that you use a matrix.

vzhouwenmsft_3-1715653127589.png

Final output in service

vzhouwenmsft_4-1715653172442.png

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @samjcarroll ,

Regarding your question, you can achieve your goal by using the 'USERPRINCIPALNAME()' function in conjunction with conditional formatting.First ensure that the data stores the email address used by the user to log in to Power BI Service.

vzhouwenmsft_0-1715652273479.png

Use the following DAX expression to create a measure(1 for opaque, 0.3 for 30% transparent)

 

Measure = 
VAR _a = USERPRINCIPALNAME()
VAR _b = SELECTEDVALUE('Table'[Email])
RETURN IF( _b = _a,"rgba(0,0,200,1)","rgba(0,0,200,0.3)")

 

Setting the Conditional Format

vzhouwenmsft_1-1715652979093.png

vzhouwenmsft_2-1715652996405.png

If you have multiple columns on the x-axis, setting the conditional format is not supported and it is recommended that you use a matrix.

vzhouwenmsft_3-1715653127589.png

Final output in service

vzhouwenmsft_4-1715653172442.png

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon โ€“ Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save โ‚ฌ200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.