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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Stuznet
Helper V
Helper V

Filter Year Dynamically without Slicer

Hi guys,

 

I'm having problem filtering the year dynamically without using my slicer. 

2018-10-24_12-09-31.jpg

I'm summing the total of IDs for this year. I could add the year in the page filter but I don't want to keep toggling the year after another.

I would like the year change that reflect to the current year. This is the function I wrote but I'm not getting the correct value.

Measure = CALCULATE([Measure]),FILTER(Table1,Table1[YearNumber] >= YEAR(Now())))

Can someone please help? thanks

2 ACCEPTED SOLUTIONS
Greg_Deckler
Community Champion
Community Champion

Many times, this is handled in the data or a measure via something along the lines of (column form):

 

Column = IF(YEAR(TODAY())=YEAR([Date]),1,0)

Then you just filter on 1



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

@Greg_DecklerThank you 🙂 I was able to get the correct count.

 

This is what I did

1) Create new column

 

Column = IF(YEAR(TODAY()) = YEAR([columnDate]),1,0)

 

2) Create new measure

 

Measure = CALCULATE(SUM(Table1[measure]),FILTER(Table1,Table1[Column]))

 

 

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

Many times, this is handled in the data or a measure via something along the lines of (column form):

 

Column = IF(YEAR(TODAY())=YEAR([Date]),1,0)

Then you just filter on 1



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_DecklerThank you 🙂 I was able to get the correct count.

 

This is what I did

1) Create new column

 

Column = IF(YEAR(TODAY()) = YEAR([columnDate]),1,0)

 

2) Create new measure

 

Measure = CALCULATE(SUM(Table1[measure]),FILTER(Table1,Table1[Column]))

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors