Forum Discussion
Column chart formatting based on parameter
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?
Sure, only a slight modification of the expression is required, sorry for misunderstanding your needs before.
6 Replies
- xifeng_LSuper User
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~
- gumis_rulezHelper I
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
- gumis_rulezHelper I
It should change color based on the customer segmentation; below 7 as on this picture orange.