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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
sebastianslzr
Regular Visitor

How to display line graph up to a specific month

Relatively new Power BI user seeking assistance.

I
want to show in the following line graph the value "Planned" until the month before the current one, that is, we are in the month of June I want to show values only until the month of May but taking into account that as the months go by the graph must move to the following month, and for the value "Actual" I want to show only those that are greater than 0.

The graph is currently displayed as follows:

sebastianslzr_0-1718129672863.png


For this case I would like to only see the value "Planned" until the month of May since we are currently in June, but I reiterate that as we go through the months of the year the graph should change, and for the value "Actual" show only those greater than 0.

An example of what I want to achieve is the following:

sebastianslzr_1-1718129733340.png

 

I explain in detail how the model is, I have a calculated table of Date that I created with the CALENDARAUTO() function and in addition to this a column to generate the months with the following DAX formula:

 

Month = FORMAT(Date[Date], "mmm", "en-US")

 

To display the year filter above the chart, I use the Year column from the calculated Date table that was created with the CALENDARAUTO() function.

"Planned" and "Actual" are two metrics that I am using to generate the bar graph, and in addition to this I have related the Date table to other tables that are the ones I use to generate the metrics that are shown in the bar graph.


1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

here is a workaround for you

try to create a scope column in calendar table

scope = if('Table 2'[Date]<=EOMONTH(today(),-1),1,0)
 
then add the scope column to filter and set to 1
11.PNG
 




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

Proud to be a Super User!




View solution in original post

1 REPLY 1
ryan_mayu
Super User
Super User

here is a workaround for you

try to create a scope column in calendar table

scope = if('Table 2'[Date]<=EOMONTH(today(),-1),1,0)
 
then add the scope column to filter and set to 1
11.PNG
 




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

Proud to be a Super User!




Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors