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! Learn more

Reply
Anonymous
Not applicable

Display data in table visual for year slicer selection ,be present betw start & end date

There is a year slicer in report and on table visual
Year filter is coming from cal table having year from 2015 to 2021
Table visual is having column from resources table (name , id , start date, end date)

When i select the year slicer the table visual should display only those resources for which the selected year is between start date and end date.
eg, if user select 2016 then the table visual should display resources from start date 2015 to 2016
can someone help me how we can show this

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Assume year is coming from the independent table

 

Create a measure and use with other columns

 

calculate(count(Table[ID]), filter(Table, year([Start Date]) <= selectedvalue(year[year]) && year([End Date]) >= selectedvalue(year[year]) ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

You could create a flag measure , then apply it into filter.

flag = IF(YEAR(MAX([start date]))<=YEAR(MAX('Date'[Date])),1,0)

Then apply it into filter.

vyalanwumsft_0-1632714383448.png

The final output is shown below:

vyalanwumsft_1-1632714401803.pngvyalanwumsft_2-1632714412803.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

As per my understanding this solution will only work for start date and not end date. Below solution suggested by Amit is correct.

Thank you very much for your response.

amitchandak
Super User
Super User

@Anonymous , Assume year is coming from the independent table

 

Create a measure and use with other columns

 

calculate(count(Table[ID]), filter(Table, year([Start Date]) <= selectedvalue(year[year]) && year([End Date]) >= selectedvalue(year[year]) ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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