The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi everyone,
Currently I am facing the following scenario/problem:
When a product is available (using the text filter function), I would like to show the number of that product that is available using a bar chart:
However, when a product is not available (i.e., count product = 0), I would like to show a text message (instead of the bar chart):
Anyone have an idea how to implement this? I guess I have to use some DAX formula here, but am not sure how.
Thanks in advance!
Solved! Go to Solution.
Hi @Anonymous ,
I don't think that completely hiding a visual is currently supported but there is a work around to make it appear so.
I would create a measure that will return a text string if the value of another measure is blank(). Something like:
ErrorMeasure =
IF (
[TestMeasure] = BLANK (),
"This product is no longer available. Please select something else.",
""
)
I'd place this error measure in a single row card, disable the category label and position it at the back of the bar chart. The bar chart should not have a background/transparent.
Proud to be a Super User!
Hi @Anonymous ,
I don't think that completely hiding a visual is currently supported but there is a work around to make it appear so.
I would create a measure that will return a text string if the value of another measure is blank(). Something like:
ErrorMeasure =
IF (
[TestMeasure] = BLANK (),
"This product is no longer available. Please select something else.",
""
)
I'd place this error measure in a single row card, disable the category label and position it at the back of the bar chart. The bar chart should not have a background/transparent.
Proud to be a Super User!
Thanks so much - this was exactly what I was looking for!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
102 | |
97 | |
80 | |
62 | |
57 |
User | Count |
---|---|
262 | |
120 | |
115 | |
83 | |
70 |