<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Add parameter in query designer (query from Power BI Performance analyser) in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Add-parameter-in-query-designer-query-from-Power-BI-Performance/m-p/3798323#M33932</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343108" data-lia-user-login="loicr" class="lia-mention lia-mention-user"&gt;loicr&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;I need your help in this similar use case which I'm currently working on. I'm not clear on how to make the parameters work. Should I need to add Report Parameters first and then create a Dataset where in the Query Designer do I need to add the query parameters separately? If so, how should I associate the Report and Query parameters? Please assist here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 29 Mar 2024 07:45:30 GMT</pubDate>
    <dc:creator>Janaki_Sankaran</dc:creator>
    <dc:date>2024-03-29T07:45:30Z</dc:date>
    <item>
      <title>Add parameter in query designer (query from Power BI Performance analyser)</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Add-parameter-in-query-designer-query-from-Power-BI-Performance/m-p/2218846#M21982</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to add a parameter in my report and add the parameter in the query designer module.&lt;/P&gt;&lt;P&gt;The query was generated within Power BI via Performance analyser.&lt;/P&gt;&lt;P&gt;I saw different posts on this issue but no clear solution.&lt;/P&gt;&lt;P&gt;First I have tried to create a parameter in the report (in my dataset properties) and add it with&amp;nbsp;@ in my query such as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;// DAX Query
DEFINE
  VAR __DS0FilterTable = 
    TREATAS({@Test}, 'FACT - Conflicts'[Conflict category])&lt;/LI-CODE&gt;&lt;P&gt;However, I have an error message that the parameter&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="12925" data-lia-user-login="test" class="lia-mention lia-mention-user"&gt;test&lt;/a&gt; was not declared.&lt;/P&gt;&lt;P&gt;So I declared it again through "Query Parameters" module within the query designer (same name and another name).&lt;/P&gt;&lt;P&gt;This time I can execute the query but it returns no row with a default value "Group" (which should not be the case - if I had put TREAT({"Group"}, it returns some rows).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to see what were the values in the Parameters properties window and I can see this.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Which I don't understand because "Test" is not the name of my dataset..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea to resolve this?&lt;/P&gt;&lt;P&gt;Thanks a lot in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 21:11:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Add-parameter-in-query-designer-query-from-Power-BI-Performance/m-p/2218846#M21982</guid>
      <dc:creator>loicr</dc:creator>
      <dc:date>2021-12-02T21:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Add parameter in query designer (query from Power BI Performance analyser)</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Add-parameter-in-query-designer-query-from-Power-BI-Performance/m-p/2222083#M22013</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343108" data-lia-user-login="loicr" class="lia-mention lia-mention-user"&gt;loicr&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try to add paramters like so:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Reference:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/sql/reporting-services/tutorial-add-a-parameter-to-your-report-report-builder?view=sql-server-ver15" target="_blank" rel="noopener"&gt;Tutorial: Add a Parameter to Your Report (Report Builder) - SQL Server Reporting Services (SSRS) | Microsoft Docs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Icey&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;SPAN&gt;, then please consider&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 06:13:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Add-parameter-in-query-designer-query-from-Power-BI-Performance/m-p/2222083#M22013</guid>
      <dc:creator>Icey</dc:creator>
      <dc:date>2021-12-06T06:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Add parameter in query designer (query from Power BI Performance analyser)</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Add-parameter-in-query-designer-query-from-Power-BI-Performance/m-p/2223692#M22035</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="164362" data-lia-user-login="Icey" class="lia-mention lia-mention-user"&gt;Icey&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your input, however, this does not solve my issue.&lt;/P&gt;&lt;P&gt;As explained, I know how to add a parameter and did it several times.&lt;/P&gt;&lt;P&gt;The example you displayed relates to SQL where I want to add my parameter in a DAX query (copied from Power BI).&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 20:02:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Add-parameter-in-query-designer-query-from-Power-BI-Performance/m-p/2223692#M22035</guid>
      <dc:creator>loicr</dc:creator>
      <dc:date>2021-12-06T20:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Add parameter in query designer (query from Power BI Performance analyser)</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Add-parameter-in-query-designer-query-from-Power-BI-Performance/m-p/2228579#M22119</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to find a solution to my problem (that raised other problems which I solved as well).&lt;/P&gt;&lt;P&gt;What I was trying to do:&lt;/P&gt;&lt;P&gt;- Use a DAX query (created by Power Bi Desktop) into Power BI Report Builder but modify it to insert some parameters that I could use in my report in Power BI Report Builder.&lt;/P&gt;&lt;P&gt;- The is the different steps I have done (for a multi-value parameter):&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Add the query in Query Designer. My query from Power BI Desktop looked like this (ensure to use a slicer with at least one value unchecked. If only one item is selected, this is what you DAX query should start with. And this is what we are going to modify.&lt;P&gt;&lt;FONT color="#FF6600"&gt;&amp;nbsp;// DAX Query DEFINE VAR __DS0FilterTable = TREATAS({"Entity"}, 'DIM_Legal_Entities'[Legal_Entity])&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;Add the parameter in the query designer by clicking on "Query Parameters";&lt;/LI&gt;&lt;LI&gt;Integrate the parameter in the DAX query like this (in my case my parameter is called "Legal_Entities")&lt;P&gt;&amp;nbsp;&lt;FONT color="#FF6600"&gt;VAR __DS0FilterTable = CALCULATETABLE('FACT_Conflicts',PATHCONTAINS(@Legal_Entities,DIM_Legal_Entities[Legal_Entity]))&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;Click on okay - don't try to execute the query; even if you select Default values in Query parameters, the query won't return any row (I'm not sure why at the moment)&lt;/LI&gt;&lt;LI&gt;The parameter should be created automatically&lt;/LI&gt;&lt;LI&gt;Right-Click on the dataset (on which you execute the query) then Dataset properties / Parameters&lt;/LI&gt;&lt;LI&gt;Set the following expression for the parameter; then click on okay: &lt;FONT color="#FF6600"&gt;=join(Parameters!Legal_Entities.Value,"|")&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;Now, we need to change the available values and default values - for some reasons as well, declaring them in Query parameters does not work as expected (or maybe I do something wrong).&lt;/LI&gt;&lt;LI&gt;Right-Click on your parameter (Parameter properties) in the parameters section of the main left menu:&lt;/LI&gt;&lt;LI&gt;Click on available values and change the different fields (in my case, I'm using a different value that the one on which I execute the query - the query is executed on a FACT dataset; where the parameter is linked to a DIM dataset)&lt;P&gt;These are the articles that helped me to understand:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;To understand why the query does not return anything in Query designed: &lt;A href="https://www.sqlbi.com/blog/marco/2019/01/31/detect-missing-parameters-in-dax-queries/" target="_self"&gt;Detect missing parameters in DAX queries - SQLBI&lt;/A&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;To understand how multi-value parameters can work:&amp;nbsp;&lt;A href="https://medium.com/bi3-technologies/adding-multiple-parameter-to-a-dax-query-as-a-filter-in-power-bi-report-builder-6eb3dd5055c" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Adding multiple parameters to a DAX query as a filter in Power BI Report Builder | by Janani Govindasamy | BI3 Technologies | Medium&lt;/SPAN&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&lt;SPAN&gt;To understand how to change the default values:&amp;nbsp;&lt;A href="https://www.mssqltips.com/sqlservertip/3506/set-select-all-as-default-for-multivalue-report-parameters-in-sql-server-reporting-services/" target="_self"&gt;https://www.mssqltips.com/sqlservertip/3506/set-select-all-as-default-for-multivalue-report-parameters-in-sql-server-reporting-services/&amp;nbsp;&lt;/A&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&lt;SPAN&gt;Hope it will help someone!&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 08 Dec 2021 20:01:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Add-parameter-in-query-designer-query-from-Power-BI-Performance/m-p/2228579#M22119</guid>
      <dc:creator>loicr</dc:creator>
      <dc:date>2021-12-08T20:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: Add parameter in query designer (query from Power BI Performance analyser)</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Add-parameter-in-query-designer-query-from-Power-BI-Performance/m-p/2607203#M24710</link>
      <description>&lt;P&gt;Great post thanks! Just wanted to comment on&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="69498" data-lia-user-login="param" class="lia-mention lia-mention-user"&gt;param&lt;/a&gt; if connecting to Oracle it is :Param&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 14:24:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Add-parameter-in-query-designer-query-from-Power-BI-Performance/m-p/2607203#M24710</guid>
      <dc:creator>W_O_L_F</dc:creator>
      <dc:date>2022-06-28T14:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Add parameter in query designer (query from Power BI Performance analyser)</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Add-parameter-in-query-designer-query-from-Power-BI-Performance/m-p/3798323#M33932</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343108" data-lia-user-login="loicr" class="lia-mention lia-mention-user"&gt;loicr&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;I need your help in this similar use case which I'm currently working on. I'm not clear on how to make the parameters work. Should I need to add Report Parameters first and then create a Dataset where in the Query Designer do I need to add the query parameters separately? If so, how should I associate the Report and Query parameters? Please assist here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 07:45:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Add-parameter-in-query-designer-query-from-Power-BI-Performance/m-p/3798323#M33932</guid>
      <dc:creator>Janaki_Sankaran</dc:creator>
      <dc:date>2024-03-29T07:45:30Z</dc:date>
    </item>
  </channel>
</rss>

