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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Brijith
New Member

Line chart with Legends.Show Data Label only for Current Month

Screenshot 2025-06-25 083821.pngI have a Line Chart in Power BI with a legend (e.g., "Actual", "Forecast", etc.).
The X-axis is 'dim_Calendar'[Year Month] (formatted as "yyyy-MMM", not a date hierarchy).
The Y-axis is a measure: Cumulative Count .
The Legend is 'Dates'[Date Category].  ("Actual", "Forecast".)

I want to: Show a vertical line at the current month (e.g., June 2025). Display data labels only at that point (i.e., for June 2025) for all legend series. The X-axis spans from May 2024 to March 2027, and I want this to work dynamically — so that next month, the vertical line and labels shift to July 2025, and so on.

The following image is in the tooltip when I point to May with the mouse. So my requirement is can we show the tooltip permanently for current month

2 REPLIES 2
121Balu
Frequent Visitor

Dear @Brijith 

You can use below dax and apply in font colour fromat option.

MAX 23 =
VAR GetAllMarket = ALLSELECTED(Query1[MATURITY_DATE].[Day])
VAR GetMaxValue= MAXX(GetAllMarket, CALCULATE([Os in Crs]))
VAR GetMinValue= MINX(GetAllMarket, CALCULATE([Os in Crs]))
RETURN
IF([Os in Crs] = GetMaxValue,"Black",IF([Os in Crs] = GetMinValue,"Red","white")
)
 
Screenshot 2025-06-25 112852.jpg

 

If you got your solution please click on like button.
 
Regards
Balakrishna
Sr. Power-BI Developer  

Thanks balakishan, I have the line. But what I want is a data label (like the tool tip that shows the data ) for current month 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors