Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
109 | |
101 | |
39 | |
31 |