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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
ErikSn
Frequent Visitor

Ignore filter context for a measure

Hi all!

I want this measure to return the latest "Bijgestelde planning" from the fact for each Date (Datum). The Datum in the third column is from the Calendar table. This column has an active relationship with Bijgestelde planning, however I'm tring to deactivate that by using ALL().

 

Mijlpalen - Categorie = 
VAR CurrentDate = MIN('Kalender'[Datum]) 
VAR CurrentProject = MIN(fct_mijlpalen[Project - Subproject])
VAR LatestEndDate = 
    CALCULATE(
        MAX(fct_mijlpalen[Bijgestelde planning]),
        FILTER(
            ALL(fct_mijlpalen),
            fct_mijlpalen[Project - Subproject] = CurrentProject &&
            fct_mijlpalen[Bijgestelde planning] <= CurrentDate
        )
    )
RETURN
LatestEndDate

 

 

ErikSn_1-1723727245832.png

So essentially I want 1-3-2024 0:00:00 to appear in all the cells above it as well. I think those rows are being filtered by the Datum column next to it, so it can't find any value in the fact because it is being filtered by the active relationship.

 

 

 

1 ACCEPTED SOLUTION
ErikSn
Frequent Visitor

I just fixed it.

I did several things:

1. I turned off the relationship using CROSSFILTER()

2. I didn't need the FILTER(ALL())

3. The fact was being filtered because of the filter on the project (VAR CurrentProject ).

ErikSn_0-1723729687380.png

 

 

View solution in original post

1 REPLY 1
ErikSn
Frequent Visitor

I just fixed it.

I did several things:

1. I turned off the relationship using CROSSFILTER()

2. I didn't need the FILTER(ALL())

3. The fact was being filtered because of the filter on the project (VAR CurrentProject ).

ErikSn_0-1723729687380.png

 

 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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