Forum Discussion
Adding Milestone flags into Line chart in power Bi
- Anonymous8 months ago
Hi bnadir55 ,
Thank you for reaching out to the Microsoft Fabric Community Forum and for sharing the screenshot. Also thank you burakkaragoz and GrowthNatives for your helpful response.
The behavior you're seeing is expected and helps identify the root cause. The milestone diamonds are appearing on incorrect or multiple dates because the milestone logic isn't linked to the current X-axis date. Power BI detects that a milestone exists in the data, but not specifically on the plotted date.
This occurs because the line chart uses a continuous Date axis from the calendar table, while milestone data comes from the Tasks table. If the DAX doesn't check that Finish_Date matches the axis date, Power BI shows the marker across multiple dates.
To resolve this, the milestone measure should only return a value when the finish date matches the X-axis date, returning BLANK otherwise. This keeps milestones aligned with the S-curve.
After making these changes, you should see one diamond per milestone, placed on the correct finish date, and aligned with the S-curve. Also, make sure the X-axis uses the Calendar[Date] column, is set to Continuous, and there's an active relationship between Calendar[Date] and Tasks[Finish_Date]. This will ensure milestones display correctly.
Thank you.
Hi bnadir55 , you can follow these steps to get the desired result :
1. Create a Milestone flag column
DAX
Is Milestone =
IF (
CONTAINSSTRING ( 'Tasks'[Name], "MS" ),
1,
0
)Optional :
DAX
Milestone Label =
IF (
[Is Milestone] = 1,
'Tasks'[Name],
BLANK()
)
2. Create a Milestone Y-position measure
Option A — Fixed height
DAX
Milestone Y =
IF (
MAX ( 'Tasks'[Is Milestone] ) = 1,
0.55, -- adjust based on your Y scale
BLANK()
)
Option B — Snap milestone to S-curve value
DAX
Milestone Y =
IF (
MAX ( 'Tasks'[Is Milestone] ) = 1,
[Cumulative Progress %],
BLANK()
)
3.Build the visual
Use Line and Scatter chart
Visual → Line and clustered column chart
Remove column values (we’ll only use line + scatter)
4. Assign fields
Line values
Y-axis (Line):
Cumulative Progress %X-axis:
Date
Scatter values (Milestones)
X-axis:
Finish_DateY-axis:
Milestone YDetails:
Milestone Label
5. Format the milestone flags
Scatter formatting
Marker shape: Diamond
Marker color: Orange
Marker size: 10–12
Data labels: On
Label = Milestone Label
Position = Above
Line formatting
Turn markers OFF
Keep line smooth
6. Filter milestones only
Apply a visual-level filter:
Is Milestone = 1
⭐Hope this solution helps you make the most of Power BI! If it did, click 'Mark as Solution' to help others find the right answers.
💡Found it helpful? Show some love with kudos 👍 as your support keeps our community thriving!
🚀Let’s keep building smarter, data-driven solutions together!🚀