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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
icassiem
Post Prodigy
Post Prodigy

Line Chart last data point for quarter and marker on last point only

Hi,

 

I have 2 visuals, one for Quarter = Q and month, my line chart shows series labels and not legend

So i have this working for a data lable on the month chart where i compare the start of month date in the fact/data source eg: 2025/01/01
this calculated col works: 

LastDataPointLabelTarget =
var DateLast = EOMONTH(calculate(max(Calc_SpecialDates[Date]), filter(allselected(Calc_SpecialDates),Calc_SpecialDates[Period]="FYTD_Full")),-1)+1
var DateSelected = EOMONTH(Netsuite_Revenue[Date],-1)+1
var TargetFull = calculate(SUM(...[Target]),REMOVEFILTERS(Calc_SpecialDates),Calc_SpecialDates[Period] = "FYTD_Full")
var ActualFull = calculate(SUM(...[Actual]),REMOVEFILTERS(Calc_SpecialDates),Calc_SpecialDates[Period] = "FYTD_Full")
 var Result = if(DateLast = DateSelected,   //2026/05/01
   if(ActualFull=0,0,(ActualFull/TargetFull)))
Return Result

1. Now for my quarter visual, that works on calander date dimension where fact relationship, of wwuarter = 1 to 4 but now i dont seem to get to show the last label in the last quarter, if i add the quarter in the fact to find the last match i get it by the 10th monht, which is the first month of the last quarter, then i dont get it displayed nor the correct total - Please Help

2. I have been trying to follow this example of only showing markers where i have the last data lable. i use series lables so dont have legens but cant seem to get a marker at the end only, these in the example does not appear for a line chart nor any expressions around the markers
How to label the latest data point in a Power BI line or area chart — DATA GOBLINS  i want the marker only for Dec and Q4 ?

Please Any Help, Thank You

1 ACCEPTED SOLUTION
anilelmastasi
Super User
Super User

Hello @icassiem ,

 

Your current approach compares full calendar dates, but at the quarter level, the line chart shows aggregated data, and the label logic needs to align with the first date of the quarter, not just EOMONTH
 
Use a similar pattern as before, but adjust your DateSelected logic to align with quarters, not months.
LastDataPointLabel_Qtr =
VAR LastFYTDDate = CALCULATE(
MAX(Calc_SpecialDates[Date]),
FILTER(
ALLSELECTED(Calc_SpecialDates),
Calc_SpecialDates[Period] = "FYTD_Full"
)
)

VAR QuarterLastDate =
QUARTER(LastFYTDDate)

VAR QuarterSelected = QUARTER(Netsuite_Revenue[Date])
VAR YearSelected = YEAR(Netsuite_Revenue[Date])
VAR YearLast = YEAR(LastFYTDDate)

VAR IsLastQtr = QuarterSelected = QuarterLastDate && YearSelected = YearLast

VAR TargetFull = CALCULATE(
SUM(...[Target]),
REMOVEFILTERS(Calc_SpecialDates),
Calc_SpecialDates[Period] = "FYTD_Full"
)

VAR ActualFull = CALCULATE(
SUM(...[Actual]),
REMOVEFILTERS(Calc_SpecialDates),
Calc_SpecialDates[Period] = "FYTD_Full"
)

RETURN
IF(
IsLastQtr,
IF(ActualFull = 0, 0, ActualFull / TargetFull)
)
 
 
Power BI does not allow conditional markers like “only show marker if this point is the last one.” Markers are either on for all points, or off.
You can:

+Create a separate measure that returns the value only for Dec (or Q4) and BLANK() elsewhere.
+Add that as a new line in your chart, with markers ON, and line color = transparent.
 
MarkerOnly =
VAR LastMonth = 12
VAR MonthSelected = MONTH(Netsuite_Revenue[Date])
VAR YearSelected = YEAR(Netsuite_Revenue[Date])
VAR LastYear = CALCULATE(MAX(YEAR(Calc_SpecialDates[Date])))

RETURN
IF(
MonthSelected = LastMonth && YearSelected = LastYear,
SUM(Netsuite_Revenue[Actual]) // Or whatever value you want to show marker for
)
 
Then:

-Add this MarkerOnly measure as a separate line in your line chart.
-Turn off line color (set alpha to 0 or make same as background).
-Turn markers ON for that series only.
-This way, you’ll get a dot/marker only at Dec (or Q4) without affecting the main line.


 If this solved your issue, please mark it as the accepted solution.

View solution in original post

3 REPLIES 3
v-tejrama
Community Support
Community Support

Hi @icassiem ,

Thanks for reaching out to the Microsoft fabric community forum.

 

As per your requirement, I have implemented a solution in Power BI where the line chart dynamically displays the label only for the last data point  whether it's in Month view (e.g., December) or Quarter view (e.g., Q4). This ensures that no other data points are labeled, keeping the chart clean and focused.

 

To achieve this, I created a proper date table with Month, Quarter, and Year columns, and established a relationship with the main data table. Then, I used a DAX measure that identifies the last visible date in the current visual context and displays the value only for that point.

 

Here's the measure:

 

ShowOnlyLastPoint =
VAR MaxVisibleDate = CALCULATE(
    MAX('DateTable'[Date]),
    ALLSELECTED('DateTable')
)
RETURN
IF(
    MAX('DateTable'[Date]) = MaxVisibleDate,
    SUM('SalesData'[Value])
)

 

This measure has been added to the chart along with the original value, and data labels are turned on. As a result, only the final data point is labeled, and it updates dynamically if filters or slicers are applied.

This approach is fully aligned with your expectations and provides a clean, focused visual for end users.

 

 

Please find the attached pbix file for your reference.

 

Best Regards,
Tejaswi.
Community Support

anilelmastasi
Super User
Super User

Hello @icassiem ,

 

Your current approach compares full calendar dates, but at the quarter level, the line chart shows aggregated data, and the label logic needs to align with the first date of the quarter, not just EOMONTH
 
Use a similar pattern as before, but adjust your DateSelected logic to align with quarters, not months.
LastDataPointLabel_Qtr =
VAR LastFYTDDate = CALCULATE(
MAX(Calc_SpecialDates[Date]),
FILTER(
ALLSELECTED(Calc_SpecialDates),
Calc_SpecialDates[Period] = "FYTD_Full"
)
)

VAR QuarterLastDate =
QUARTER(LastFYTDDate)

VAR QuarterSelected = QUARTER(Netsuite_Revenue[Date])
VAR YearSelected = YEAR(Netsuite_Revenue[Date])
VAR YearLast = YEAR(LastFYTDDate)

VAR IsLastQtr = QuarterSelected = QuarterLastDate && YearSelected = YearLast

VAR TargetFull = CALCULATE(
SUM(...[Target]),
REMOVEFILTERS(Calc_SpecialDates),
Calc_SpecialDates[Period] = "FYTD_Full"
)

VAR ActualFull = CALCULATE(
SUM(...[Actual]),
REMOVEFILTERS(Calc_SpecialDates),
Calc_SpecialDates[Period] = "FYTD_Full"
)

RETURN
IF(
IsLastQtr,
IF(ActualFull = 0, 0, ActualFull / TargetFull)
)
 
 
Power BI does not allow conditional markers like “only show marker if this point is the last one.” Markers are either on for all points, or off.
You can:

+Create a separate measure that returns the value only for Dec (or Q4) and BLANK() elsewhere.
+Add that as a new line in your chart, with markers ON, and line color = transparent.
 
MarkerOnly =
VAR LastMonth = 12
VAR MonthSelected = MONTH(Netsuite_Revenue[Date])
VAR YearSelected = YEAR(Netsuite_Revenue[Date])
VAR LastYear = CALCULATE(MAX(YEAR(Calc_SpecialDates[Date])))

RETURN
IF(
MonthSelected = LastMonth && YearSelected = LastYear,
SUM(Netsuite_Revenue[Actual]) // Or whatever value you want to show marker for
)
 
Then:

-Add this MarkerOnly measure as a separate line in your line chart.
-Turn off line color (set alpha to 0 or make same as background).
-Turn markers ON for that series only.
-This way, you’ll get a dot/marker only at Dec (or Q4) without affecting the main line.


 If this solved your issue, please mark it as the accepted solution.

Thank You @v-tejrama , @anilelmastasi 
I got it going. my only issue with the second measure was that is repeats in the tooltip

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.