Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi,
I am using dax function to create dynamically table with number of clients in each segment. The function is as follows:
Would like to create a bar graph as below but formatted in two colors:
-- customers below selected value orange
-- customes above selected value dark blue
Any hints how to resolve this?
Solved! Go to Solution.
Sure, only a slight modification of the expression is required, sorry for misunderstanding your needs before.
Hi @gumis_rulez ,
You need to create a measure and use it to the conditional formatting of bar color, can refer to below demo.
Color =
VAR SelectedNum = SELECTEDVALUE('Parameter'[Parameter])
VAR CurCustCount = [All Customers Count]
RETURN
IF(CurCustCount<SelectedNum,"#e96b30","#118dff")
//IF(CurCustCount<SelectedNum,"orange","blue")
Demo - Column chart formatting based on parameter.pbix
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
I have followed your way and it seems it is not working. I am attaching my file.
https://drive.google.com/file/d/1gtJZnGAkEPzXYvMn77hH5eVAYzaaCMG3/view?usp=sharing
It should change color based on the customer segmentation; below 7 as on this picture orange.
You previously blocked the slicer's filtering of the visuals, resulting in slicer-selected values not being passed.
You need to create another parameter table and apply it to the slicer. Pls refer to below demo.
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
Very interesting solution. For sure will use someday.
For this project the goal is to create conditional formating based on x-axis customer segmentation. If parameter = 4 then the graph should look as follows:
In your solution the conditional formating works based on the values for each of 20 segments. In the desired one, no matter the value - parameter formats the segments. Is it something which can be done?
Sure, only a slight modification of the expression is required, sorry for misunderstanding your needs before.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
6 | |
4 | |
3 | |
3 |
User | Count |
---|---|
13 | |
11 | |
8 | |
8 | |
8 |