Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
First pic shows what my current Line and Clustered Column chart looks like, representing stock levels.
Normally i would go to Data Labels -> apply series to Annotation Point -> Detail -> Data field to "Annotation Label" and it would show my data labels. However, this seems to only work if my legend or column y-axis field is empty. (as seen below)
Is there a way to fix this? Not sure if this is a dax issue or formatting.
Below is the dax for the "annotation label" referenced in Data Labels:
Annotation Label =
VAR CurrentLabel = SELECTEDVALUE('Chart Axis'[Label])
RETURN
SWITCH(
CurrentLabel,
"April", "Order",
"August", "Replenish",
BLANK()
)
Solved! Go to Solution.
The value for line chart can't be text. We can only display numbers
However, you can add it in the label details.
Proud to be a Super User!
When the Legend or Column y-axis is empty, each point on the visual has a single row in filter context, so SELECTEDVALUE on the axis label returns cleanly. The moment you add a Legend, each axis position now has multiple rows in context and SELECTEDVALUE returns BLANK because it can no longer resolve a single value. So I believe you could try using a measure as below if the values are same for every legend:
Annotation Label =
VAR _CurrentLabel =
MAX ( 'Chart Axis'[Label] )
RETURN
SWITCH (
_CurrentLabel,
"April", "Order",
"August", "Replenish",
BLANK ()
)
Hi @derekli1700 ,
Thanks for reaching out to the Microsoft fabric community forum.
I would also take a moment to thank @ryan_mayu , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you.
Best Regards,
Community Support Team
The value for line chart can't be text. We can only display numbers
However, you can add it in the label details.
Proud to be a Super User!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 35 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 39 | |
| 35 | |
| 23 |