Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Solved! Go to Solution.
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 - Please share a link to pbix.
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.
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"
hi
can you point one out for me please in Report Filter
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_
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.
Instead of removing spaces from Table / Column, you need to replace spaces with _x0020_
Thanks for the excellent feedback. Much appreciated I solved the solution using just that. Once again thank u.
For troubleshooting, I'd recommend trying one filter at a time and then combine them.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |