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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
brokencornets
Helper IV
Helper IV

Filtering using date table not working how I would like

Hi all

 

I have a list of tasks and with a frequency (in days) and an initial start date.

 

What I want to do is use a date filter to be able to show how many iterations needed to be completed within a given timeframe. I've written the following calculated column and it ALMOST works, except it appears to complete ignore the date filter:

 

Expected Iterations =
VAR maxdate= max('Date'[Date])
VAR mindate=max(min('Date'[Date]),'Task List'[First Instance])
RETURN
if(mindate>maxdate,0,
CALCULATE(datediff(mindate,maxdate,DAY),USERELATIONSHIP('Date'[Date],'Task List'[First Instance]))/'Task List'[Freq Days])
 
So I get results showing like the below - rather than show total iterations in the 12 month period, it shows total iterations due from First Instance (or Min of Date table) to Max of Date table (today + 10 yrs).
 
If a task has a frequency of 365 it should have expected iterations of 1 based on the 12 month date range - while those with Freq 180 should show 2, Freq 28 maybe 12 or 13, etc.
 
I'm sure it'll be due to relationships but struggling to get my head around it! Any help much appreciated.
 
 brokencornets_0-1647439226059.png

 

2 ACCEPTED SOLUTIONS
johnt75
Super User
Super User

Filters and slicers don't affect calculated columns, they are only calculated once when the data is refreshed.

If you need the values to react to to slicers try doing it as a measure instead.

View solution in original post

AlexisOlson
Super User
Super User

It looks like you might have defined this as a calculated column rather than a measure and calculated columns cannot be responsive to slicers since they are computed only when the data model is loaded or refreshed, not in response to user interactions or report settings like measures are.

 

Edit: @brokencornets, it looks like @johnt75 saw the same thing first so please mark their answer as the solution if you choose between us.

View solution in original post

3 REPLIES 3
brokencornets
Helper IV
Helper IV

Thanks both, I now have a working measure!

AlexisOlson
Super User
Super User

It looks like you might have defined this as a calculated column rather than a measure and calculated columns cannot be responsive to slicers since they are computed only when the data model is loaded or refreshed, not in response to user interactions or report settings like measures are.

 

Edit: @brokencornets, it looks like @johnt75 saw the same thing first so please mark their answer as the solution if you choose between us.

johnt75
Super User
Super User

Filters and slicers don't affect calculated columns, they are only calculated once when the data is refreshed.

If you need the values to react to to slicers try doing it as a measure instead.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.