March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
I'm trying to add a conditional formatting for background to Card visualisation.
The goal is to conditionally hide slicer when I have only one value and show when more values are available.
I've found an article how to do that: https://exceleratorbi.com.au/show-or-hide-a-power-bi-visual-based-on-selection/
The problem is that, when I'm trying to add my measure to conditional formatting as a Field value, I cannot do that. There is no reaction for my selection.
I use Live connection. In different project without Live connection the same formula works.
My formula for measure:
I tried also to add this measure to my Analysis Services tabular model, but the effect is the same.
Is there some workaround to conditionally hide slicer with Live connection or do that in a way with conditional formatting?
Solved! Go to Solution.
Hi @Anonymous
It is impossible to add such measure in the conditional formating as a field when using live connection.
Best Regards
Maggie
I resolve my problem.
I couldn't use my measure which was created in Power BI Desktop with live connection, but it is possible to add this measure to Analysis Services tabular model.
Then I can add the measure (that return hex color) to conditional formatting.
I believe that the solution that this is impossible with a live connection is false. As others have said, one solution is that you can directly add a measure in the data model.
OR you can click on a measure in PBI, go to Measure Tools, and explicitly change the data type to "Text". After doing this, you should be able to select your measure when applying conditional formatting through field values. Here is the original post on this.
(change data type of measure to text)
(the measure is no longer grayed out in conditional formatting)
Best,
Matt
This may be an old post, but you helped tremendously with this. Thank you Matt!
I resolve my problem.
I couldn't use my measure which was created in Power BI Desktop with live connection, but it is possible to add this measure to Analysis Services tabular model.
Then I can add the measure (that return hex color) to conditional formatting.
Hi,
Thanks for this post it worked for me as well:
if model is stored in PBIX you can apply measure as "Field value",
if this live connection to Analysis Services you can apply measure that is inside of the model,
You do not have to process the model every time you work on the measure just deploy it to the AS and refresh report.
Hi @Anonymous
It is impossible to add such measure in the conditional formating as a field when using live connection.
Best Regards
Maggie
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |