Forum Discussion
Hiding Reference Labels on Cards when unfiltered and Remove empty dates on charts
Hi everyone,
I’m currently working on a dashboard in Microsoft Power BI Desktop and would appreciate some guidance on a couple of refinements I’m trying to implement.
Hiding reference labels in cards
I have reference labels displayed in card visuals, but I’d like them to only appear when a time filter is applied. When no time filter is selected, I want those labels to be hidden. Is there a way to conditionally show/hide these labels based on filter context
DSO trend (Month–Year) visual cleanup
In my DSO trend chart (by Month–Year), I’d like to hide months where there is no data, so the visual only displays relevant periods. What’s the best approach to remove or suppress empty months in this case?
You can create a measure and use it for the reference labels. This measure should return a value only when a filter is applied; otherwise, it should return blank. You can use the ISFILTERED function for that.
Regarding the line chart, make sure to uncheck Show items with no data on the X-axis. I also noticed there is a dashed line that continues even when the main line does not, so that may also need to be fixed if disabling Show items with no data does not solve it.
6 Replies
- Odet_MaimoniAdvocate I
You can create a measure and use it for the reference labels. This measure should return a value only when a filter is applied; otherwise, it should return blank. You can use the ISFILTERED function for that.
Regarding the line chart, make sure to uncheck Show items with no data on the X-axis. I also noticed there is a dashed line that continues even when the main line does not, so that may also need to be fixed if disabling Show items with no data does not solve it.
- pankajnamekar25Super User
If possible can you attached pbix with dummy data or some pictures
If my response helped you, please consider clicking
Accept as Solution ✅ and giving it a Like 👍 – it helps others in the community too.
Thanks,
Connect with me on:
LinkedIn - Ashish_MathurSuper User
Hi,
I don't think the reference labels can be conditionally hidden. As regards, the second question, try this measure
Measure = if(isblank([Sales]),blank(),[DSO])
If this does not help, then share the download link of the PBI file.
- danextianSuper User
hi joshsalvador
Regarding the blank category, it appears because your date dimension doesn’t fully span the dates present in either the target or actual lines. The simplest fix is to exclude it using a visual-level filter.
As for the reference labels, dynamically hiding them isn’t currently supported. You can use a conditional measure to control the label text but this will not shrink the space allocated for the reference label. Sample measure:
IF ( ISFILTERED ( DatesTable ), [reference label measure] ) - v-ssriganeshCommunity Support
Hi joshsalvador,
Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to danextian, Ashish_Mathur & Odet_Maimoni for sharing valuable insights.
Could you please confirm if your query has been resolved by the provided solutions? This would be helpful for other members who may encounter similar issues.
Thank you for being part of the Microsoft Fabric Community.
- v-ssriganeshCommunity Support
Hello joshsalvador,
Hope everything’s going great with you. Just checking, the issue been resolved or are you still running into problems? Sharing an update can really help others facing the same thing.
Thank you.