I have a visual as below:
How to show "*" instead of 4 and 2 i.e. value is greater than 0 and less than or equal to 5?
If I create a new measure at below:
the "*" doesn't show up. Even the bars for mango and pineapple are lost - makes sense, as "*" is not a value.
However, I need to show "*" based on my criteria. I'm fine not showing any bar.
I looked around but can't figure out a way to work this out. Did anyone have a similar issue or know what to do?
Short answer, you can't.
Long answer - you shouldn't change it to *
I'd want to know why you want to suppress a value in the first place but still leave the corresponding bar in?
Additionally, the value count at the top of each bar is a mathematical count, it will always return a number in this bar chart.
If the value is not important, you should just filter the visual to not show values below 4.
Having a "*" will only add noise to your graph - if you want to show that values below a certain number are not important, I'd use colour to change the bars. Anything below 4 could be greyed out, as this subconsiously tells the reader that this part of the graph is not important.
Alternatively, you can change the font of the value to white, that way a 4 will still be displayed, but will get drowned out in the background.
Reason to show a "*": I want the data to be unidentifiable.
below is an example
in the above screenshot, there is only 1 person aged "over 90" at postcode = 1. the graph shows 5K. If the postcode =1 belongs to a small town where everyone knows each other, everyone would know that one old guy and his/her's net worth.
I am fine not showing a bar, but would definitely like to have a "*" so that viewers know data is hidden to avoid identifying personal information.
I've worked with similar problems before, where its important to suppress certain figures/ counts.
In this case you need to create a measure and display it in a table.
Suppressed Sum of Income =
VAR NumberOfPeople = COUNTROWS(your table name) //this will count the number of people//
NumberOfPeople < 3, "*",
//this sets the number of people you want to show the maximum of per postcode//
//you can also set other conditions here, like if the total income is below a certain number, just follow (condition, result if condition met)//
@Len_Barr if you look at my question, that's what I have done. I have created a measure to show "*" where the sum <= 5.
But unfortunately, the * doesn't show up as a data label in the chart. Again, I'm fine not having a bar, but need to have "*" as a data label.
@NishDash , You need to use the custom label method using calculation group, if that can help
@amitchandak the link shows ways to put different measures on the same graph using a slicer. e.g. current year monthly sales and previous year monthly sales.
In my case, I not looking to have the data changed, but simply hide/mask the figure if it is 1 => x <= 5 by "*".
Check out the November 2023 Power BI update to learn about new features.
130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.