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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

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
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.