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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Cannot get my DAX Measure to filter the destination file

Hi Experts

 

I have the following DAX whichis supposed to filter the desintation pbix file based on the filter criteria selected by the user. When i click on the URL link below, nothing happens in the destination file, it just load and the filters are not getting applied. i am trying to use a measure as a hyperlink...

 

I cannot see whats i have done wrong been trying to trouble shoot this for a few hours and keep on hitting a wall.

Report Filter = 
    VAR oL = "DIM Sales Person/Office Location eq '" & SELECTEDVALUE( 'DIM Sales Person'[Office Location] ) & "'" 
    VAR oC = "DIM Sales Person/City eq '" & SELECTEDVALUE('DIM Sales Person'[City]) & "'" 
    VAR oS  = "DIM Shipper/Ship Company Name eq '" & SELECTEDVALUE('DIM Shipper'[Ship Company Name]) & "'"
    VAR oP = "DIM Product/Category Name eq '" & SELECTEDVALUE('DIM Product'[Category Name]) & "'"
    VAR oSP = "DIM Sales Person/Sales Person eq '" & SELECTEDVALUE('DIM Sales Person'[Sales Person]) & "'"
    VAR oRegion = "DIM Sales Person/Sales Region eq '" & SELECTEDVALUE('DIM Sales Person'[Sales Region]) & "'"
    VAR oDate = IF(ISFILTERED( 'Calendar'[Date] ), "Calendar/Date le"  & MAX('Calendar'[Date]) & "and Calendar/Date gt" & MIN('Calendar'[Date]))
    RETURN

    [Report URL] & 
    SWITCH(
        TRUE,
        ISFILTERED( 'DIM Sales Person'[Office Location] ) &&  ISFILTERED( 'DIM Sales Person'[City]  ), "?filter=" & oL & " and " & oC & " and " & oS & " and " & oP & " and " & oSP & " and " & oRegion & " and " & oDate,
        ISFILTERED( 'DIM Sales Person'[Office Location] ), "?filter=" & oL, 
        ISFILTERED( 'DIM Sales Person'[City]  ), "?filter=" & oC,
        ISFILTERED( 'DIM Shipper'[Ship Company Name]  ), "?filter=" & oS,
        ISFILTERED( 'DIM Product'[Category Name] ), "?filter=" & oP,
        ISFILTERED( 'DIM Sales Person'[Sales Person]), "?filter=" & oSP,
        ISFILTERED( 'DIM Sales Person'[Sales Region]), "?filter=" & oRegion, 
        oDate
        
        )

PS happy to post a link to data if required.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

https://app.powerbi.com/groups/6a4fa620-97e6-425b-ba79-1c9b9c209e68/reports/af3aec6d-bf0a-4630-b357-...DIM Sales Person/Office Location eq 'USA' and DIM Sales Person/City eq '<Removed>' and DIM Shipper/Ship Company Name eq '<Removed>' and DIM Product/Category Name eq '<Removed>' and DIM Sales Person/Sales Person eq '<Removed>' and DIM Sales Person/Sales Region eq '<Removed>' and Calendar/Date le12/31/2017and Calendar/Date gt11/7/2014

 

In the above, DIM Sales Person and others need to have spaces replaced with _x0020_

 

 

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

@Anonymous  - Please share a link to pbix. 

Anonymous
Not applicable

https://www.dropbox.com/s/8el1g6z3oreyy0q/URL_Link_Test_File_6.pbix?dl=0

 

try and publish "Duplicate of Company Details"  as a new pbix file and you'll need to update the Report URL.

I am using measure Report Filter 1 as my hyperlink to destination published pbix.

 

you could also use Report Filter 2 both should work agin same issue with this DAX code too.

Anonymous
Not applicable

In Report Filter, some spaces need to be encoded.

Report Filter 2 doesn't contain the ?filter=

Both have some instances where there is not a space before the word "and"

Anonymous
Not applicable

hi

 

can you point one out for me please in Report Filter

 

Anonymous
Not applicable

https://app.powerbi.com/groups/6a4fa620-97e6-425b-ba79-1c9b9c209e68/reports/af3aec6d-bf0a-4630-b357-...DIM Sales Person/Office Location eq 'USA' and DIM Sales Person/City eq '<Removed>' and DIM Shipper/Ship Company Name eq '<Removed>' and DIM Product/Category Name eq '<Removed>' and DIM Sales Person/Sales Person eq '<Removed>' and DIM Sales Person/Sales Region eq '<Removed>' and Calendar/Date le12/31/2017and Calendar/Date gt11/7/2014

 

In the above, DIM Sales Person and others need to have spaces replaced with _x0020_

 

 

Anonymous
Not applicable

hi i have just tried

 

https://app.powerbi.com/groups/6a4fa620-97e6-425b-ba79-1c9b9c209e68/reports/af3aec6d-bf0a-4630-b357-4e057c9c4bd2/ReportSectiond77d965cc24737ab52b1?filter=DIMSalesPerson/OfficeLocation eq 'USA'

for one filter and no result.

Anonymous
Not applicable

Instead of removing spaces from Table / Column, you need to replace spaces with _x0020_

Anonymous
Not applicable

Thanks for the excellent feedback. Much appreciated I solved the solution using just that. Once again thank u.

Anonymous
Not applicable

For troubleshooting, I'd recommend trying one filter at a time and then combine them.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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