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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
LukeDurrant
Frequent Visitor

YTD Line Graph

I want my YTD line graph to show Jan-Oct when Oct is selected on the slicer but it is only showing data for October?

LukeDurrant_0-1707319761898.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @LukeDurrant 

 

I ran the testing as follows.

 

My sample:

vxuxinyimsft_0-1707390746014.png

 

vxuxinyimsft_1-1707390779669.png

 

Create a measure as follows

Measure = IF(MONTH(MAX('Table'[Date])) <= MONTH(SELECTEDVALUE('Date'[Date])), 1, 0)

 

Put the measure into the visual-level filters, set up show items when the value is 1.

vxuxinyimsft_4-1707390954483.png

Is this the result you expect?

 

Best Regards,
Community Support Team _Yuliax

 

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

3 REPLIES 3
Anonymous
Not applicable

Hi @LukeDurrant 

 

I ran the testing as follows.

 

My sample:

vxuxinyimsft_0-1707390746014.png

 

vxuxinyimsft_1-1707390779669.png

 

Create a measure as follows

Measure = IF(MONTH(MAX('Table'[Date])) <= MONTH(SELECTEDVALUE('Date'[Date])), 1, 0)

 

Put the measure into the visual-level filters, set up show items when the value is 1.

vxuxinyimsft_4-1707390954483.png

Is this the result you expect?

 

Best Regards,
Community Support Team _Yuliax

 

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

LukeDurrant
Frequent Visitor

Is it possible to change it so that i only have to select oct to show Jan - Oct?

audreygerred
Super User
Super User

You need to select Jan-Oct in the slicer to get it to show Jan-Oct.





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

Proud to be a Super User!





Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.