Replace last week filter on page with YTD filter in measure

Hi All,

Problem: I’m trying to create a measure that ignores the filter on the page and returns a YTD number.

Here is my measure that works with no issues:
Count product sold > 10 by date and product =
COUNTROWS(
FILTER(
SUMMARIZECOLUMNS(
‘Calendar’[Date],
Salestable[Product],
“10 Sales of Product”,COUNT(SalesTable[Invoice ID])
),
SalesTable[Invoice ID]>=10)
)
)

This provides me with the amount of times a product is sold more than 10 times in one day.

I have a filter of last weeks dates (weekoffset = -1) on the page but would like to create the same measure that overrides this filter and returns a YTD number. Note my data set has multiple years.

This is my first post so thanks in advance for your time and patience.

Hi @muldoon_maj. Can you add a (sanitized, if necessary) work-in-progress PBIX file and/or dataset to help us visualize the issue/solution? Greg

Thanks Greg for the quick response. I was able to figure it out, pretty straight forward so apologies for the post.

All I needed to do was create a new measure:
YTD = CALCULATE([Count product sold > 10 by date and product], DATESYTD(‘Calendar’[Date])
This ignores any filters on the page.

Glad you found a solution. No worries … please always feel free to ask questions … that’s IMO an essential part of the learning process. Greg