cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
garythomannCoGC
Super User
Super User

FILTER path, why one method works and not the other?

As per the title why does 'path B' work and the commented out segment of code 'path A' does not?

 

 

 

EVALUATE

VAR ProgressList_Target =
    FILTER ( 
        SELECTCOLUMNS ( 
            'Measure Benefit Progress List',
            "MeasureID"   , 'Measure Benefit Progress List'[Main ID LkUpId]+0,
            "Financial Year"    , 'Measure Benefit Progress list'[Financial Year],
            "Target"      , 'Measure Benefit Progress list'[Revised]   -- value for 2027
        ),
        ---'Measure Benefit Progress list'[Financial Year] = "2026-27"   -- path A

            PATHCONTAINS ( "2026-27", [Financial Year] )   -- path B

    )

RETURN 
    ProgressList_Target

 

 

 

How to make 'path A' work?    The  https://dax.guide/filter/  guide example uses the exact same construct.

EVALUATE
FILTER (
    Customer,
    Customer[Continent] = "Europe"
)
1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @garythomannCoGC 

Please try it this way

EVALUATE
VAR ProgressList_Target =
    FILTER (
        SELECTCOLUMNS (
            'Measure Benefit Progress List',
            "MeasureID", 'Measure Benefit Progress List'[Main ID LkUpId] + 0,
            "@FinancialYear", 'Measure Benefit Progress list'[Financial Year],
            "Target", 'Measure Benefit Progress list'[Revised]
        ),
        [@FinancialYear] = "2026-27"
    )
RETURN
    ProgressList_Target

View solution in original post

2 REPLIES 2
garythomannCoGC
Super User
Super User

Thanks @tamerj1 for your reply and code sample.  I see it clearly now 😂

tamerj1
Super User
Super User

Hi @garythomannCoGC 

Please try it this way

EVALUATE
VAR ProgressList_Target =
    FILTER (
        SELECTCOLUMNS (
            'Measure Benefit Progress List',
            "MeasureID", 'Measure Benefit Progress List'[Main ID LkUpId] + 0,
            "@FinancialYear", 'Measure Benefit Progress list'[Financial Year],
            "Target", 'Measure Benefit Progress list'[Revised]
        ),
        [@FinancialYear] = "2026-27"
    )
RETURN
    ProgressList_Target

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.

Top Solution Authors
Top Kudoed Authors