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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
garythomannCoGC
Impactful Individual
Impactful Individual

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
Impactful Individual
Impactful Individual

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.