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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Show current year data if no filter is selected

Hi all!

 

I have a table that shows names (text type) according to the selected year.

Is there a possibility that if I don't select any year in the slicer it will show me the names of the current year in the table?

 

Thank you!

Regards!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

You can create a measure as below and add it to visual filter.

Measure = 
var selected_year = IF(ISFILTERED('date'[year]),SELECTEDVALUE('date'[year]),YEAR(TODAY()))
return
IF(SELECTEDVALUE('Table'[year])=selected_year,1,0)

4.PNG

5.PNG

6.PNG

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

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
amitchandak
Super User
Super User

@Anonymous , not sure what you mean by table.

You can show year like

 

Measure = year(Today())

data measure

This Year = CALCULATE(sum('order'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))

This Year = CALCULATE(sum('order'[Qty]),filter(ALL('Date'),'Date'[Year]=today())))

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
Anonymous
Not applicable

Hi @amitchandak !

 

I have a table visual that only shows names of people (Text type).

These names are in my fact table that is related to the time dimension.

 

In this page I have a slicer where you can select years and according to the selected year the people will change.


I want that if there is nothing selected, it shows me the names of the current year and not all the names that exist.

In the way you have proposed in your answer it could not be done.

 

Thanks !!

Anonymous
Not applicable

Hi @Anonymous ,

 

You can create a measure as below and add it to visual filter.

Measure = 
var selected_year = IF(ISFILTERED('date'[year]),SELECTEDVALUE('date'[year]),YEAR(TODAY()))
return
IF(SELECTEDVALUE('Table'[year])=selected_year,1,0)

4.PNG

5.PNG

6.PNG

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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