The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi All
Can we enable conditional color formatting using Visual Calculations done (example in a matrix)?
Please let me know if there is way.
Thanks for inputs
No, conditional color formatting does not work with Visual Calculations in Power BI because these calculations are done at the visualization layer and are not part of the data model. Power BI’s conditional formatting rules require a measure or field from the data model, but Visual Calculations only exist within the report UI and cannot be referenced for formatting. As a workaround, you can create a measure in the data model that replicates the Visual Calculation logic and use it for formatting. Another approach is to define a separate measure specifically for conditional formatting using DAX, which assigns numerical values mapped to colors. If the calculation is row-level, you can consider using a calculated column instead. Since Visual Calculations are a relatively new feature, Microsoft may enhance them in future updates to support conditional formatting directly.
Thanks Poojara 🙂
It does not solve my problem, but it answers my question.
I am 100% based on a live connexion model, I do not want to go in Direct Query mode, so I cannot create new measures.
Since I cannot modify the model, I am relying only on visual calculations to add new "measures" in my reports.
I guess I will do without formatting for now.
Thanks !
Thanks @lbendlin !
My visual calculation is
Class = SWITCH(
TRUE(),
[Running sum (%)] > 0.95, "C",
[Running sum (%)] > 0.8, "B",
"A"
)
I would like the background of A to be green, the background of B to be yellow and the background of C to be red.
How can I achieve that with FORMAT ?
Would it be something like this?
Class = SWITCH(
TRUE(),
[Running sum (%)] > 0.95, FORMAT("C","red"),
[Running sum (%)] > 0.8, FORMAT("B","yellow"),
FORMAT("A","green")
)
Hi everyone!
Our wish has come true!!!
Check out the February 2025 update blog post!
https://powerbi.microsoft.com/en-us/blog/power-bi-february-2025-feature-summary/
Can't wait to try it out!
Have a great weekend!
Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.
Hi guys,
I am looking for the same solution here.
I have a table visual with a visual calculation column.
I would like to change the background color in this column according to each cell's value.
However, visual calc do not appear in the conditional formatting options 😞
Any idea how we can do that?
Thanks a lot,
Christian
You need to include the FORMAT as part of your visual calculation.