{"id":970,"date":"2020-12-07T20:42:49","date_gmt":"2020-12-07T20:42:49","guid":{"rendered":"http:\/\/jackofalltradesmasterofsome.com\/blog\/?p=970"},"modified":"2023-02-28T14:48:35","modified_gmt":"2023-02-28T14:48:35","slug":"power-bi-paginated-reports-multi-select-url-parameters","status":"publish","type":"post","link":"https:\/\/jackofalltradesmasterofsome.com\/blog\/2020\/12\/07\/power-bi-paginated-reports-multi-select-url-parameters\/","title":{"rendered":"Power BI Paginated Reports &#038; Multi Select URL Parameters"},"content":{"rendered":"\n<p>When building drill to \/ drill thru reports in  Power BI Paginated Reports &amp; Multi Select URL Parameters, the best way to do this is using an Action URL as the basic default linking does not work. Here are the steps to call a child report using multiselect parameters to a child report.<\/p>\n\n\n\n<p><em>Side Note: Want to learn <a href=\"https:\/\/subscribepage.io\/8daystosqlcourse\">SQL <\/a>or <a href=\"https:\/\/subscribepage.io\/Py2Y8D\">Python <\/a>for free. In less then 10 minutes a day and less than an hour total? Signup for my free classes delivered daily right to your email inbox for free!  <\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/subscribepage.io\/8daystosqlcourse\"><img loading=\"lazy\" decoding=\"async\" width=\"558\" height=\"280\" src=\"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2023\/02\/image-1.png\" alt=\"\" class=\"wp-image-1305\" srcset=\"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2023\/02\/image-1.png 558w, https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2023\/02\/image-1-300x151.png 300w\" sizes=\"auto, (max-width: 558px) 100vw, 558px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/subscribepage.io\/Py2Y8D\"><img loading=\"lazy\" decoding=\"async\" width=\"572\" height=\"281\" src=\"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2023\/02\/image-2.png\" alt=\"\" class=\"wp-image-1306\" srcset=\"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2023\/02\/image-2.png 572w, https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2023\/02\/image-2-300x147.png 300w\" sizes=\"auto, (max-width: 572px) 100vw, 572px\" \/><\/a><\/figure>\n\n\n\n<p>Now back to the article&#8230;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setting up the Child Report <\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>Deploy the child Report to app.powerbi.com and run the report to obtain the URL for the report. <ol><li>This cannot be done directly from app.powerbi.com as this URL will not render when passing parameters in the URL<\/li><\/ol><ol><li>Copy and paste this URL into a Notepad window<\/li><\/ol><ol><li>Below are the parameter dataset query and multiselect parameter set up in the child reports.<\/li><\/ol><\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"447\" height=\"301\" src=\"http:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-16.png\" alt=\"\" class=\"wp-image-971\" srcset=\"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-16.png 447w, https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-16-300x202.png 300w\" sizes=\"auto, (max-width: 447px) 100vw, 447px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"447\" height=\"280\" src=\"http:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-17.png\" alt=\"\" class=\"wp-image-972\" srcset=\"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-17.png 447w, https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-17-300x188.png 300w\" sizes=\"auto, (max-width: 447px) 100vw, 447px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>It is best to test with the URL before adding this to your parent record<ul><li>Paste the URL into a web browser to confirm the child reports work<\/li><\/ul><\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Hardcode the passing of parameters in the URL\nEdit the URL in notepad by adding \u201c&amp;rp:parametername=xyx\u201d to the end where\nthe parameter name is the exact same name as the name in the Report builder\ntool. If you need to add more, continue to add \u201c&amp;rp:parametername=xyx\u201d to\nthe string.<\/li><li>I.e\n\u201chttps:\/\/app.powerbi.com\/groups\/me\/rdlreports\/617a3daa-0d7b-412b-9vs2-0213123123?ctid=eeb53a15-a2e4-46de-8608-22657ab58979&amp;rp:param1=test&amp;rp:param2=202012\u201d<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>For multiselect parameters, you can add the same\nparameter to the string to select multiple values\n\u201c&amp;rs:parametername=xyx&amp;rs:parametername=xyx&amp;rs:parametername=xyx\u201d<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Building the Parent Report <\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Now that we have a working tested URL, Head back to the parent report to build the dynamic URL. In the field that needs to contain the drill to, right click the box and select \u201cTextbox Properties\u201d<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"162\" height=\"137\" src=\"http:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-18.png\" alt=\"\" class=\"wp-image-973\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Select \u201cActions -&gt; URL\u201d and use the Fx to create an expression<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"569\" height=\"309\" src=\"http:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-19.png\" alt=\"\" class=\"wp-image-974\" srcset=\"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-19.png 569w, https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-19-300x163.png 300w\" sizes=\"auto, (max-width: 569px) 100vw, 569px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>The expression should read =\u201dURL&amp;rp:parametername=\u201d + Parameters!paramtername.Value. You can use the string function to concatenate the actual parameter values on the parent report to create a dynamic URL at run time that matches what you have in your test notepad file. <\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"110\" src=\"http:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-20.png\" alt=\"\" class=\"wp-image-975\" srcset=\"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-20.png 624w, https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-20-300x53.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"450\" height=\"171\" src=\"http:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-21.png\" alt=\"\" class=\"wp-image-976\" srcset=\"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-21.png 450w, https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-21-300x114.png 300w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>For multlselect parameters you can append the code JOIN(Parameters!parametername.value, \u201crs:parametername\u201d) and this will dynamically create a string of all the parameter values needed for the multiselect.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"101\" src=\"http:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-22.png\" alt=\"\" class=\"wp-image-977\" srcset=\"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-22.png 624w, https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-22-300x49.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\"><li>To test, put this string in a Text box\nexpression on the report so you can see it render at runtime to be able to\nexport and test.<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Large Multi Select Parameters<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>If you have a multiselect that is large, it may exceed the 2048 characters of a URL available when generating the dynamic string. For this to work, in your parameter dataset, add a Union to a \u201cAll\u201d value. Make \u201c0\u201d the default in your parameter as well, which represents the \u201cAll\u201d value.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"230\" height=\"320\" src=\"http:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-23.png\" alt=\"\" class=\"wp-image-978\" srcset=\"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-23.png 230w, https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-23-216x300.png 216w\" sizes=\"auto, (max-width: 230px) 100vw, 230px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"554\" height=\"291\" src=\"http:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-24.png\" alt=\"\" class=\"wp-image-979\" srcset=\"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-24.png 554w, https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-24-300x158.png 300w\" sizes=\"auto, (max-width: 554px) 100vw, 554px\" \/><figcaption><br><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"416\" height=\"345\" src=\"http:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-25.png\" alt=\"\" class=\"wp-image-980\" srcset=\"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-25.png 416w, https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-25-300x249.png 300w\" sizes=\"auto, (max-width: 416px) 100vw, 416px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\"><li>When you run the report, the All parameter should be selected by default.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"330\" height=\"182\" src=\"http:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-26.png\" alt=\"\" class=\"wp-image-981\" srcset=\"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-26.png 330w, https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-26-300x165.png 300w\" sizes=\"auto, (max-width: 330px) 100vw, 330px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\"><li>Go back to the report to create the full select statement for the values of the report in your main query and reference the parameter with a Or Statement the uses the new default \u2018All\u2019 value.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"412\" height=\"152\" src=\"http:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-27.png\" alt=\"\" class=\"wp-image-982\" srcset=\"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-27.png 412w, https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-27-300x111.png 300w\" sizes=\"auto, (max-width: 412px) 100vw, 412px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\"><li>The report will run with the default \u201cAll\u201d value and bring back all results. <\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"282\" height=\"326\" src=\"http:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-28.png\" alt=\"\" class=\"wp-image-983\" srcset=\"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-28.png 282w, https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-content\/uploads\/2020\/12\/image-28-260x300.png 260w\" sizes=\"auto, (max-width: 282px) 100vw, 282px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\"><li>The same logic can now be applied to the child\nreport when the parameter value is passed down in the dynamic URL<\/li><\/ol>\n\n\n\n<p>Power BI Paginated Reports &amp; Multi Select URL Parameters<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When building drill to \/ drill thru reports in Power BI Paginated Reports &amp; Multi Select URL Parameters, the best way to do this is using an Action URL as the basic default linking does not work. Here are the steps to call a child report using multiselect parameters to a child report. Side Note: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":969,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[96],"tags":[101],"class_list":["post-970","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-power-bi","tag-power-bi"],"_links":{"self":[{"href":"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-json\/wp\/v2\/posts\/970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-json\/wp\/v2\/comments?post=970"}],"version-history":[{"count":2,"href":"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-json\/wp\/v2\/posts\/970\/revisions"}],"predecessor-version":[{"id":1309,"href":"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-json\/wp\/v2\/posts\/970\/revisions\/1309"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-json\/wp\/v2\/media\/969"}],"wp:attachment":[{"href":"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-json\/wp\/v2\/media?parent=970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-json\/wp\/v2\/categories?post=970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jackofalltradesmasterofsome.com\/blog\/wp-json\/wp\/v2\/tags?post=970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}