Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
Vinesh23
New Member

Line chart - conditional marker color and labels only for specific months (native visual limitation)

Hi everyone,

I’m working on a maintenance KPI trend in Power BI Desktop and facing a limitation with the native line chart.

Requirement:

  • Show a continuous FPM (%) line by Fiscal Month.

  • Display markers only for months where a rebuild occurred.

  • Those rebuild markers should be red, while other months remain yellow or hidden.

  • Also need numeric values visible near rebuild markers.

  • Must remain in native Power BI visuals (no Deneb/custom visuals), and the chart already uses a Legend (asset code).

What I tried:

  • Created a DAX measure that returns value only for rebuild months (else BLANK).

  • Using this on Y-axis breaks the line (expected behavior with BLANKs).

  • Conditional formatting for marker color is not available in line charts.

  • Scatter plot allows markers but does not reliably show measure value labels.

  • Overlaying visuals works, but I’d like to confirm whether a single native visual solution exists or if this is a product limitation.

Question:
Is there any supported way in native Power BI line/scatter visuals to:

  1. Keep a continuous line,

  2. Show markers only for selected data points,

  3. Apply different marker colors conditionally , and

  4. Display data labels only for those markers?

Or is this scenario officially not supported and requires:

  • Multiple overlaid visuals, or

  • Deneb/custom visual?

  • Any other visuals that deliver the same idea?

Any guidance or confirmation from Microsoft/MVPs would be greatly appreciated.

 

Thanks in advance!

This is how I require :
Vinesh23_1-1770275668383.png

 


This is the DAX I used (passed under values of data labels) and the one obtained:

Vinesh23_2-1770275959145.png

 

2 ACCEPTED SOLUTIONS
Jaywant-Thorat
Super User
Super User

Hi @Vinesh23 

This is a native Power BI line chart limitation. What you want (all together in one native visual) is NOT supported today.

Why your attempts fail (expected behavior):

  • BLANK() → breaks the line (by design)
  • Marker color cannot be conditionally formatted
  • Data labels are all-or-nothing
  • Scatter plot ≠ reliable timeline + legend behavior

What actually works (native-only options):
Option 1 : Overlay 2 visuals - Common & Recommended

  • Visual 1: Line chart
    • Continuous FPM line
    • No markers
  • Visual 2: Scatter chart
    • Only rebuild months
    • Red markers
    • Data labels ON
  • Sync axes + transparent background
    • Native
    • Clean
    • Performant
    • Production-safe

Option 2: Line chart + constant lines (partial)

  • Use Analytics pane
  • Add vertical lines for rebuild months
  • Add tooltip / label via page tooltip
  • No red markers
  • Less intuitive

Option 3: Accept limitation

  • Show all markers
  • Single color
  • Use tooltip to highlight rebuilds

What you cannot bypass:

  • No DAX workaround
  • No formatting hack
  • No hidden setting
  • Legend blocks most advanced tricks

Remember:

This scenario is officially not supported in a single native Power BI visual.

To meet all requirements, you must use:

  • Overlaid native visuals OR
  • Deneb / custom visual (if allowed)

=================================================================
Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Jaywant Thorat | MCT | Data Analytics Coach | Super User
LinkedIn: https://www.linkedin.com/in/jaywantthorat/
Join #MissionPowerBIBharat: https://tinyurl.com/JoinMissionPowerBIBharat
#MissionPowerBIBharat
LIVE with Jaywant Thorat

View solution in original post

danextian
Super User
Super User

Hi @Vinesh23 

The native visuals do not support conditonal formatting when legends are added. You can make the visual appear to look like it does but a bit finnicky to setup.

 

Create a disconnected table with the legend category repeated twice - one for the line and another .

for the marker.

danextian_1-1770290729622.png

Create a measure that references this table and conditionally returns a value depending on the type.   Total Revenue and Max Point are calculated separately and TREATAS is used to propagate a virtual relationship betwen the disconnected and Category tables. In the below measure, I'm return the marker only if it is equal to the max value among all the values in the visible row.

Category2 Value = 
VAR _type = SELECTEDVALUE ( Category2[Type] )
RETURN
SWITCH (
    TRUE (),
    _type = "Line",
        CALCULATE (
            [Total Revenue],
            TREATAS ( VALUES ( Category2[Category] ), Category[Category] )
        ),
    _type = "Marker",
        CALCULATE (
            [Max Point],
            TREATAS ( VALUES ( Category2[Category] ), Category[Category] )
        )
)

Markers are enabled for all categories, but they are set to transparent for those with a Line type. While it’s possible to enable markers only for the Marker type, doing so ensures there are no visible marker borders that inherit or match the line colors when hovering over an active marker. The visible markers are set to have the same color. As to the legend, it is disabled for the line chart and another visual is used to show just the legends for Line Type.

danextian_2-1770291145374.png

Please see the attached pbix.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

4 REPLIES 4
v-prasare
Community Support
Community Support

We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.

 

 

 

Thank you for your patience and look forward to hearing from you.
Best Regards,
Prashanth Are
MS Fabric community support

v-prasare
Community Support
Community Support

We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.

 

 

 

Thank you for your patience and look forward to hearing from you.
Best Regards,
Prashanth Are
MS Fabric community support

danextian
Super User
Super User

Hi @Vinesh23 

The native visuals do not support conditonal formatting when legends are added. You can make the visual appear to look like it does but a bit finnicky to setup.

 

Create a disconnected table with the legend category repeated twice - one for the line and another .

for the marker.

danextian_1-1770290729622.png

Create a measure that references this table and conditionally returns a value depending on the type.   Total Revenue and Max Point are calculated separately and TREATAS is used to propagate a virtual relationship betwen the disconnected and Category tables. In the below measure, I'm return the marker only if it is equal to the max value among all the values in the visible row.

Category2 Value = 
VAR _type = SELECTEDVALUE ( Category2[Type] )
RETURN
SWITCH (
    TRUE (),
    _type = "Line",
        CALCULATE (
            [Total Revenue],
            TREATAS ( VALUES ( Category2[Category] ), Category[Category] )
        ),
    _type = "Marker",
        CALCULATE (
            [Max Point],
            TREATAS ( VALUES ( Category2[Category] ), Category[Category] )
        )
)

Markers are enabled for all categories, but they are set to transparent for those with a Line type. While it’s possible to enable markers only for the Marker type, doing so ensures there are no visible marker borders that inherit or match the line colors when hovering over an active marker. The visible markers are set to have the same color. As to the legend, it is disabled for the line chart and another visual is used to show just the legends for Line Type.

danextian_2-1770291145374.png

Please see the attached pbix.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Jaywant-Thorat
Super User
Super User

Hi @Vinesh23 

This is a native Power BI line chart limitation. What you want (all together in one native visual) is NOT supported today.

Why your attempts fail (expected behavior):

  • BLANK() → breaks the line (by design)
  • Marker color cannot be conditionally formatted
  • Data labels are all-or-nothing
  • Scatter plot ≠ reliable timeline + legend behavior

What actually works (native-only options):
Option 1 : Overlay 2 visuals - Common & Recommended

  • Visual 1: Line chart
    • Continuous FPM line
    • No markers
  • Visual 2: Scatter chart
    • Only rebuild months
    • Red markers
    • Data labels ON
  • Sync axes + transparent background
    • Native
    • Clean
    • Performant
    • Production-safe

Option 2: Line chart + constant lines (partial)

  • Use Analytics pane
  • Add vertical lines for rebuild months
  • Add tooltip / label via page tooltip
  • No red markers
  • Less intuitive

Option 3: Accept limitation

  • Show all markers
  • Single color
  • Use tooltip to highlight rebuilds

What you cannot bypass:

  • No DAX workaround
  • No formatting hack
  • No hidden setting
  • Legend blocks most advanced tricks

Remember:

This scenario is officially not supported in a single native Power BI visual.

To meet all requirements, you must use:

  • Overlaid native visuals OR
  • Deneb / custom visual (if allowed)

=================================================================
Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Jaywant Thorat | MCT | Data Analytics Coach | Super User
LinkedIn: https://www.linkedin.com/in/jaywantthorat/
Join #MissionPowerBIBharat: https://tinyurl.com/JoinMissionPowerBIBharat
#MissionPowerBIBharat
LIVE with Jaywant Thorat

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.