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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
atowriss1
Advocate I
Advocate I

Line graph interaction with page filter

Still learning here...

I have a line graph that shows for the current year and my page will have a month/year filter.  Currently, when I choose a month, my graph shows that one dot for the month.  

I know I can turn off interactions, but is it possible to make the graph show the line up to the date selected?  So if Aug 2022 was chosen, I would see the line up until Aug?

 

Thx

 

 

 

 

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi , @atowriss1 

Here are the steps you can refer to :

(1)This is my test data :

vyueyunzhmsft_0-1665369827837.png

(2)We can create a calendar table, we don't need to create relationships between two tables:

Calendar = ADDCOLUMNS( 
CALENDAR(FIRSTDATE('Table'[Date]),LASTDATE('Table'[Date])),
"year_month", year([Date]) * 100 + MONTH([Date])
)

(3)We can create a measure :

Value = var _slice = MAX('Calendar'[Date])
var _current= MAX('Table'[Date])
return 
IF(_current<= _slice , SUM('Table'[Value]) , BLANK() )

(4)Then we can put the filed we need  in the visual and then we can meet your need:

vyueyunzhmsft_1-1665369951108.png

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

View solution in original post

2 REPLIES 2
v-yueyunzh-msft
Community Support
Community Support

Hi , @atowriss1 

Here are the steps you can refer to :

(1)This is my test data :

vyueyunzhmsft_0-1665369827837.png

(2)We can create a calendar table, we don't need to create relationships between two tables:

Calendar = ADDCOLUMNS( 
CALENDAR(FIRSTDATE('Table'[Date]),LASTDATE('Table'[Date])),
"year_month", year([Date]) * 100 + MONTH([Date])
)

(3)We can create a measure :

Value = var _slice = MAX('Calendar'[Date])
var _current= MAX('Table'[Date])
return 
IF(_current<= _slice , SUM('Table'[Value]) , BLANK() )

(4)Then we can put the filed we need  in the visual and then we can meet your need:

vyueyunzhmsft_1-1665369951108.png

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

johnt75
Super User
Super User

You could create a disconnected table to use in your slicer, you can copy the appropriate columns from your Date table using SELECTCOLUMNS. You will need the month number column as well as the month name.

You can then either amend your existing measure or write a new one just for this purpose, something like

Filtered measure = CALCULATE( [Existing Measure], 'Date'[Year] = SELECTEDVALUE('Slicer table'[Year]), 'Date'[Month number] <= SELECTEDVALUE( 'Slicer table'[Month number]) )

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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