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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

add an additional filter criteria to selction

Hi Experts

 

I have the following DAX formula which is using a filter within a uRL and the URL dynamically updates based on the filter selection. 

 

How could i amend the code to include an addtional filter office City into the DAX as shown below...

link to part 1 of question

https://community.powerbi.com/t5/Desktop/URLs-Power-Bi-Desktop/m-p/717338/highlight/false#M346191

 

current dax formula...

Report Filter = IF(ISFILTERED('DIM Sales Person'[Office Location]),[Report URL]&"?filter=" & "DIM Sales Person" & " eq " &"'" & SELECTEDVALUE('DIM Sales Person'[Office Location]) & "'",[Report URL])
1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You can try following code.

 

Report URL = "https://msit.powerbi.com/groups/me/reports/xxxxxxx/ReportSection"

 

Report Filter = IF(AND(ISFILTERED('DIM Sales Person'[Office Location]),ISFILTERED('DIM Sales Person'[office City])),[Report URL]&"?filter=" & "DIM Sales Person/Office Location" & " eq " &"'" & SELECTEDVALUE('DIM Sales Person'[Office Location]) & "'" and "DIM Sales Person/Office City" & " eq " &"'" & SELECTEDVALUE('DIM Sales Person'[Office City]) & "'",[Report URL])

 

You can refer to the links: https://docs.microsoft.com/en-us/power-bi/service-url-filters#filter-on-multiple-fields ,

https://www.kasperonbi.com/creating-a-hyperlink-with-filters-through-dax/ .

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You can try following code.

 

Report URL = "https://msit.powerbi.com/groups/me/reports/xxxxxxx/ReportSection"

 

Report Filter = IF(AND(ISFILTERED('DIM Sales Person'[Office Location]),ISFILTERED('DIM Sales Person'[office City])),[Report URL]&"?filter=" & "DIM Sales Person/Office Location" & " eq " &"'" & SELECTEDVALUE('DIM Sales Person'[Office Location]) & "'" and "DIM Sales Person/Office City" & " eq " &"'" & SELECTEDVALUE('DIM Sales Person'[Office City]) & "'",[Report URL])

 

You can refer to the links: https://docs.microsoft.com/en-us/power-bi/service-url-filters#filter-on-multiple-fields ,

https://www.kasperonbi.com/creating-a-hyperlink-with-filters-through-dax/ .

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Many Thanks Any much appreciated once again excellent feedback as always.

Anonymous
Not applicable

Hi Amy

I looked at the kasper de jong method re your link and could not get that to work either. The problem in facing is when I take the url of the published box file from services and apply that to my measure with the filter it's either falling over or not giving the filtered result.

https://www.dropbox.com/s/32peobnjkl2i6bx/URL_Link_Test_File_5.pbix?dl=0

See link to file uploaded...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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