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,
I was able to get this to work bu seperating out the growth% math to a different measure.
// Base measures
Agent Previous Score = MAX ( Scores[Previous] )
Agent Current Score = MAX ( Scores[Current] )
Agent Score Delta = [Agent Current Score] - [Agent Previous Score]
// Growth as a numeric measure (good for other visuals)
Growth % = DIVIDE ( [Agent Score Delta], [Agent Previous Score] )
// Text label for custom data label (forces a string even when numeric is BLANK)
Growth Label (text) =
VAR g = [Growth %]
RETURN
IF (
NOT ISBLANK ( g ),
FORMAT ( g, "0.0%" ) & " " & IF ( g >= 0, "▲", "▼" ),
"" // empty string (not BLANK) so the visual will still try to draw it
)
Here is a working file example
https://drive.google.com/file/d/1qs2FnBAQr68TQhXMlKvU6zr9gWM1AqyG/view?usp=sharing
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
Hi Tayloramy
I had tried splitting into sperate measures earlier and tried your approach as well. This didn't work, I believe it should work. I am at a loss to why it doesn't.
Thanks for replying
- tayloramy10 months ago
Super User
Hi jasemilly,
Is what I achieved in the file I linked not your intended goal?
If not, I may have misunderstood what you're needing.
- jasemilly10 months ago
Helper III
Yes that is my intended goal, and I have tried splitting it into 2 measures. It doesn't work in my report. I beleive this approach should work and I can see it does in your example. Just not on my report, and I am at a complete loss as to why not.
- tayloramy10 months ago
Super User
Hi jasemilly,
My text table measure is also a little different than yours, have you tried using mine in your report?
Growth Label (text) = VAR g = [Growth %] RETURN IF ( NOT ISBLANK ( g ), FORMAT ( g, "0.0%" ) & " " & IF ( g >= 0, "▲", "▼" ), "" // empty string (not BLANK) so the visual will still try to draw it )If this still doesn't work, can you post sample data where this isn't working so we can replicate the issue?
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.