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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
HaiVN
Helper II
Helper II

Shows each 5 year in line chart

Hello,

I have data with to columns: average income and year  for 20 years from 2000  to 2020.
I can make a line chart to show average income( y axis) and year ( X axis) for 20 years
My problem is I want to change graph to show data at each 5 year: 2000, 2005, 2010,2015,2020.
I plan to add one kolumn which show "Yes" for year =2000, 2005, 2010,2015,2020. and "No" for other and use this for filter! Do you have any other better ideas? 

Thank you! 

2 ACCEPTED SOLUTIONS
v-kaiyue-msft
Community Support
Community Support

Hi @HaiVN ,

 

You can create a measure.

FilteredYears =
IF(
SELECTEDVALUE('Table'[Year]) IN {2000, 2005, 2010, 2015, 2020},
1,
0
)


Then drag it into the filter pane on the right to filter the data with a value of 1.

vkaiyuemsft_0-1724378964149.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

Expand the filter pane and select your desired years there.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Expand the filter pane and select your desired years there.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-kaiyue-msft
Community Support
Community Support

Hi @HaiVN ,

 

You can create a measure.

FilteredYears =
IF(
SELECTEDVALUE('Table'[Year]) IN {2000, 2005, 2010, 2015, 2020},
1,
0
)


Then drag it into the filter pane on the right to filter the data with a value of 1.

vkaiyuemsft_0-1724378964149.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

WulffJoergen
Helper I
Helper I

The alternative to that is to create a temporary table that starts filtering on those years. In that way you will not create a new column. But then again if your PBIX file is not heavy, your solution works fine.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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