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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Narukkp
Helper V
Helper V

How to pass In operator dynamically in Web URL condition from summary report

Hi Team,

Using below code web url conditon I am able to access the detail report from summary report but when I am selected multiple values in filter panel then I am unable to pass the multi selection values to detail report .

Could you please let me know how to pass the In operator based on filter selection.

 

test =
Var P =SELECTEDVALUE(Dim_Corp_Hier[Group])
Var A=SELECTEDVALUE(Dim_Corp_Hier[Area])
RETURN
"https://app.powerbi.com/groups/3343f374-5faf-4b28-a156-9f83946a0b5b/reports/79804728-1cc9-48ca-8f53-... eq '"&P&"' and Dim_Corp_Hier/Area eq '"&A&"'"

1 ACCEPTED SOLUTION

Hi Team,

I got the solution. FYI

test =
Var Grp = IF(ISFILTERED(Dim_Corp_Hier[Group]),"Dim_Corp_Hier/Group in ('" & CONCATENATEX(VALUES(Dim_Corp_Hier[Group]), Dim_Corp_Hier[Group],"', '") & "')","")
Var A= IF(ISFILTERED(Dim_Corp_Hier[Area])," and Dim_Corp_Hier/Area in ('" & CONCATENATEX(VALUES(Dim_Corp_Hier[Area]), Dim_Corp_Hier[Area],"', '") & "')","")
Var B= IF(ISFILTERED(Dim_Corp_Hier[Business Unit])," and Dim_Corp_Hier/Business_x0020_Unit in ('" & CONCATENATEX(VALUES(Dim_Corp_Hier[Business Unit]), Dim_Corp_Hier[Business Unit],"', '") & "')","")
Return
rptURL&Grp&A&B


View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Narukkp , Try like

test =
Var _P = "('" ConcatenateX(allselected(Dim_Corp_Hier),Dim_Corp_Hier[Group],"','") & "')"
Var _A= "('" ConcatenateX(allselected(Dim_Corp_Hier),Dim_Corp_Hier[Area],"','") & "')"
RETURN
"https://app.powerbi.com/groups/3343f374-5faf-4b28-a156-9f83946a0b5b/reports/79804728-1cc9-48ca-8f53-... Dim_Corp_Hier/Group in " & _P & "Dim_Corp_Hier/Area in " & _A

 

 

But number of in values might be limited

 

https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-url-filters

Hi @amitchandak Thanks for the reply.
When i am using above code in Measure i am getting error like "Unexpected expression Concatenatex".  In my scenario i required caluculate measure because filter columns are coming from differnet datasets. 

Hi,

I am able to achieve my requirement using below code but if I am not select anything from filter panel then it is taking all values from group, area, business unit columns, so query string got exceeded to 2000 characters and getting page can not display.

Could you please tell me anyone if I am not selecting any value in filter panel then it should not pass any value to query string.

 

Test =
Var Grp ="Dim_Corp_Hier/Group in ('" & CONCATENATEX(VALUES(Dim_Corp_Hier[Group]), Dim_Corp_Hier[Group],"', '") & "')"
Var A= " and Dim_Corp_Hier/Area in ('" & CONCATENATEX(VALUES(Dim_Corp_Hier[Area]), Dim_Corp_Hier[Area],"', '") & "')"
Var B= " and Dim_Corp_Hier/Business_x0020_Unit in ('" & CONCATENATEX(VALUES(Dim_Corp_Hier[Business Unit]), Dim_Corp_Hier[Business Unit],"', '") & "')"
Var rptURL= "https://app.powerbi.com/groups/3343f374-5faf-4b28-a156-9f83946a0b5b/reports/79804728-1cc9-48ca-8f53-..."
Return
rptURL&Grp&A&B

 

Hi Team,

I got the solution. FYI

test =
Var Grp = IF(ISFILTERED(Dim_Corp_Hier[Group]),"Dim_Corp_Hier/Group in ('" & CONCATENATEX(VALUES(Dim_Corp_Hier[Group]), Dim_Corp_Hier[Group],"', '") & "')","")
Var A= IF(ISFILTERED(Dim_Corp_Hier[Area])," and Dim_Corp_Hier/Area in ('" & CONCATENATEX(VALUES(Dim_Corp_Hier[Area]), Dim_Corp_Hier[Area],"', '") & "')","")
Var B= IF(ISFILTERED(Dim_Corp_Hier[Business Unit])," and Dim_Corp_Hier/Business_x0020_Unit in ('" & CONCATENATEX(VALUES(Dim_Corp_Hier[Business Unit]), Dim_Corp_Hier[Business Unit],"', '") & "')","")
Return
rptURL&Grp&A&B


Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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