Forum Discussion
Custom data label on area chart not showing value. Measure displays correctly on a table
- Anonymous10 months ago
Hi jasemilly ,
Thank you for your follow-up and for pinpointing that the issue was due to missing dates in the fact table. If the dataset doesn’t cover a continuous date range, visuals like the area chart may not render labels for dates with no data, even though the measure works correctly in a table.
To fix this, create a separate Date table, mark it as a Date Table in your model, and link it to your fact table. Using functions like ISINSCOPE() or COALESCE() can help ensure your measure returns values for all dates, allowing labels to display consistently.
Glad to see you and tayloramy have already identified the root cause. If you can provide an updated PBIX via a public link, the community can review and confirm your solution resolves the visual issue.
Thank you.
Hi jasemilly ,
Yes. It is possible to do what you are trying to do with the following steps:
- In the stacked area chart, go to Visualization pane → Visual tab → Data label → turn it On
- go to Values section and put a measure below in the Field box:
Growth % Label (text) =
VAR g = [Growth % (numeric, safe)]
RETURN
IF (
ISINSCOPE ( 'Date'[Date] ) && NOT ISBLANK ( g ),
FORMAT ( g, "0.0%" ) & IF ( g >= 0, " ▲", " ▼" ),
BLANK ()
)
The resultant output is as shown below, and I hope that this meets your requirement.
I attach an example pbix file for your reference.
Best regards,
Thanks for taking a look but I have done this already everything appears fine when I hard code it.