Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I'm tring to add conditional colors to columns based on what's less than/greater than a dynamic parameter value. Any ideas on how to do it? Adding a column with dynamic values seemed promising, but I came up short on being able to implement it. TIA.
Solved! Go to Solution.
You can create a dynamic color measure. In place of static values, you can replace with value from the slicer
Color Date = if(FIRSTNONBLANK('Date'[date],TODAY()) <today(),"lightgreen","red")
Color sales = if(AVERAGE(Sales[Sales Amount])<170,"green","red")
Color Year = if(FIRSTNONBLANK('Date'[Year],2014) <=2016,"lightgreen",if(FIRSTNONBLANK('Date'[Year],2014)>2018,"red","yellow"))
Use fields option under conditional control and choose a measure like this. Refer :https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
You can create a dynamic color measure. In place of static values, you can replace with value from the slicer
Color Date = if(FIRSTNONBLANK('Date'[date],TODAY()) <today(),"lightgreen","red")
Color sales = if(AVERAGE(Sales[Sales Amount])<170,"green","red")
Color Year = if(FIRSTNONBLANK('Date'[Year],2014) <=2016,"lightgreen",if(FIRSTNONBLANK('Date'[Year],2014)>2018,"red","yellow"))
Use fields option under conditional control and choose a measure like this. Refer :https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
Worked perfectly. Thank you!
I feel like this is really close. What do I do with that measure in the context of needing to change the colors of the colums in this image based on the selection of the highlighted parameter?
Hi @czuniga ,
It will be really useful to have some form of screesnhots to your query or a .pbix file.
Currently, it's hard to understand and answer your question.
Thanks,
Pragati
Hi Pragati, thanks for the response. I'm trying to conditionally format the colors of the these columns based on the selectio of the highlighted parameter.
@czuniga You can actually create a measure that does this. I actually had to do the same thing based on a rolling average. Check the links below
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting
https://www.blue-granite.com/blog/controlling-conditional-formatting-using-dax
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
71 | |
37 | |
31 | |
27 |
User | Count |
---|---|
91 | |
49 | |
44 | |
39 | |
35 |