Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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.
Anyone know of a way to accomplish this in Power BI so that it is dynamic based on which user is viewing the report?
Solved! Go to Solution.
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.
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
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.
Final output in service
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.
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
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.
Final output in service
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
90 | |
81 | |
65 | |
65 | |
61 |
User | Count |
---|---|
170 | |
115 | |
100 | |
73 | |
67 |