The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi guys,
I'm having problem filtering the year dynamically without using my slicer.
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
Solved! Go to Solution.
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
@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]))
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
@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]))