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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

CALCULATE Measure ignores on page filters

I have a table visual which displays various details about various projects. It has several report wide filters, to narrow to specific teams or project types, and a couple slicers to further limit results. There are 13 projects relevant to my filters that show up. 

 

I then wrote a measure that will calculate the next software release date like this:

 

NextRelease = 
    CALCULATE(
        MIN(FactTasks[DueDate]),
        DimTasks[TaskType] = "Software Version Release",
        FactTasks[DueDate] > TODAY()
    )

 

 When I applied this measure to my visual it gave me the next release date for the projects which had tasks of "Software Version Release" type and worked how I wanted it to. Many projects don't have a next release date though, and the measure returns a blank. 

 

I want to set it up so it will return "No Upcoming Release" if the measure returns blank. So I wrote this:

 

 

NextRelease = 
// end date for soonest task of type "software version release" after today
VAR NextRelease = 
    CALCULATE(
        MIN(FactTasks[DueDate]),
        DimTasks[TaskType] = "Software Version Release",
        FactTasks[DueDate] > TODAY()
    )
RETURN
    IF(
        ISBLANK(NextRelease), 
        "No Upcoming Release", 
        NextRelease
    )

 

 

Now when I add the measure to my visual, it's like it ignores all of my on page filters for which projects to include and I see every single project. I'm not sure what changed with adding the IF() function to mess up my report filters.

 

Thank you in advance.

2 REPLIES 2
FreemanZ
Super User
Super User

hi @Anonymous 

you also added an argument with KEEPFILTERS, if you leave this argument out, do you get the expected result?

 

what fields do you have for on page filters?

Anonymous
Not applicable

Hi, I intended to copy in the code that didn't use KeepFilters, this has been fixed in the original post. If I leave it out I don't get the expected result, nor if I leave it in do I get the correct result.

 

These are my page level filters. ProjectsAssignmentSoftwareProjectTeam and ProjectType come from other dimension tables not referenced in my measure, and Status comes from FactTasks. 

eloomis_0-1673965496657.png

 

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.