<?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: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2232132#M22151</link>
    <description>&lt;P&gt;Thank you for sharing this technique and I learned new knowledge on PowerBI report builder. I followed your approach and there's already data displayed on the report.&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Dec 2021 08:59:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-12-10T08:59:35Z</dc:date>
    <item>
      <title>Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2211676#M21926</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a report using PowerBI Report builder and the dataset query is coming from&amp;nbsp;&lt;STRONG&gt;Performance Analyzer.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I define a Year and Month parameter but if I choose a multiple value on year or month i'm getting an error or no data displayed on the report. If i choose single value on the parameter the report is working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another thing, if i choose multiple value on year parameter, i'm also getting an error.&lt;/P&gt;&lt;P&gt;cannot covert value &amp;lt;pii&amp;gt;2019|2020&amp;lt;/pii&amp;gt; of type tp type integer while processing column &amp;lt;pii&amp;gt;[static column]-&amp;gt;datetable[Received Year]&amp;lt;/pii&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Parameter: set expression value&lt;/P&gt;&lt;P&gt;=Join(Parameters!Year.Value,"|")&lt;/P&gt;&lt;P&gt;=Join(Parameters!Month.Value,"|")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the DAX query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// DAX Query&lt;BR /&gt;DEFINE&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;VAR __DS0FilterTable =&lt;BR /&gt;TREATAS({@Year}, 'DateTable'[Received Year])&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;VAR __DS0FilterTable1 =&lt;BR /&gt;TREATAS({@Month}, 'DateTable'[MonthName])&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;VAR __DS0FilterTable2 =&lt;BR /&gt;TREATAS({"Phone"}, 'CSST'[Product Group])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR __DS0FilterTable3 =&lt;BR /&gt;TREATAS({"AER"}, 'CCST'[Category])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;EVALUATE&lt;BR /&gt;TOPN(&lt;BR /&gt;501,&lt;BR /&gt;SUMMARIZECOLUMNS(&lt;BR /&gt;ROLLUPADDISSUBTOTAL(&lt;BR /&gt;'CSST'[Category], "IsGrandTotalRowTotal",&lt;BR /&gt;'CSST'[Client], "IsDM0Total",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I believe the parameters are just not working correctly or the DAX query, likely, something wrong I did, but&amp;nbsp;I have no idea how to fix this.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I have tried innumerous things! Please help!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 09:16:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2211676#M21926</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-29T09:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2211745#M21928</link>
      <description>&lt;P&gt;So the issue here is that when you mark a parameter as accepting multiple values Report Builder sets it as an array data type and DAX does not support array parameters. By using the JOIN() function you are converting the array to a string, but you query is then comparing the concatenated string to the values in the column which will not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have 3 options here:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;you could use the RSCustomDaxFilter() function, note this is not a DAX function, but is something that the report builder engine pre-processes (see&amp;nbsp;&lt;A href="https://blog.crossjoin.co.uk/2019/11/03/power-bi-report-builder-and-rscustomdaxfilter/" target="_blank"&gt;https://blog.crossjoin.co.uk/2019/11/03/power-bi-report-builder-and-rscustomdaxfilter/&lt;/A&gt;) This is what the query builder in Report Builder will generate for multi-value parameters and is probably the simplest approach.&lt;/LI&gt;
&lt;LI&gt;You could construct your entire query as a Report Builder expression and manually concatenate the parameter values in to the query, but this can get tricky to debug as you have to do a lot of escaping of quotes.&lt;/LI&gt;
&lt;LI&gt;You could use a PATHCONTAINS approach (see&amp;nbsp;&lt;A href="https://blog.crossjoin.co.uk/2018/05/16/a-new-approach-to-handling-ssrs-multi-valued-parameters-in-dax-queries/" target="_blank"&gt;https://blog.crossjoin.co.uk/2018/05/16/a-new-approach-to-handling-ssrs-multi-valued-parameters-in-dax-queries/&lt;/A&gt;)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 09:50:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2211745#M21928</guid>
      <dc:creator>d_gosbell</dc:creator>
      <dc:date>2021-11-29T09:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2212036#M21931</link>
      <description>&lt;P&gt;Thank you for the reply. By the way, How can I&amp;nbsp; change the code for TREATAS to accomodate multiple values.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 13:07:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2212036#M21931</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-29T13:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2212700#M21935</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you for the reply. By the way, How can I&amp;nbsp; change the code for TREATAS to accomodate multiple values.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Treatas will accomodate multiple values, the problem is mapping the parameter from Report Builder to the parameter in the query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If we take the top 3 lines of your query as an example&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;// DAX Query
DEFINE
VAR __DS0FilterTable =
TREATAS({@Year}, 'DateTable'[Received Year])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Currently with the JOIN in your parameter expression this will expand to the following with a single string value:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;// DAX Query
DEFINE
VAR __DS0FilterTable =
TREATAS({"2019|2020"}, 'DateTable'[Received Year])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What it needs to&amp;nbsp; be is something like the following (assuming your Year is an integer column)&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;// DAX Query
DEFINE
VAR __DS0FilterTable =
TREATAS({2019,2020}, 'DateTable'[Received Year])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only way I know to use TREATAS is to click the fx button on the query and build the query as a dynamic expression using something like the following (option 2 from my first post)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will noticed the red doubling up of quotes that is required in order to embed a quote inside a quoted string expression. This is the tricky bit of building your query this way. If you don't escape all the quotes correctly the report will not run and it can be tricky to find mistakes. But once you have it working it functions well. I have one report I build like this which is has about 15 optional parameters so I actually include/exclude entire sections of the query based on whether the parameters have a value or not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;="&lt;/P&gt;
&lt;P&gt;// DAX Query&lt;BR /&gt;DEFINE&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;VAR __DS0FilterTable =&lt;BR /&gt;TREATAS({" +&amp;nbsp;&lt;SPAN&gt;Join(Parameters!Year.Value,",")&lt;/SPAN&gt; + "}, 'DateTable'[Received Year])&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;VAR __DS0FilterTable1 =&lt;BR /&gt;TREATAS({&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;""&lt;/FONT&gt;&lt;/STRONG&gt;" +&amp;nbsp;&lt;SPAN&gt;Join(Parameters!Month.Value,"&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;""&lt;/FONT&gt;&lt;/STRONG&gt;,&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;""&lt;/STRONG&gt;&lt;/FONT&gt;")&lt;/SPAN&gt; + "&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;""&lt;/FONT&gt;&lt;/STRONG&gt;}, 'DateTable'[MonthName])&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;VAR __DS0FilterTable2 =&lt;BR /&gt;TREATAS({&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;""&lt;/FONT&gt;&lt;/STRONG&gt;Phone&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;""&lt;/STRONG&gt;&lt;/FONT&gt;}, 'CSST'[Product Group])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;VAR __DS0FilterTable3 =&lt;BR /&gt;TREATAS({&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;""&lt;/FONT&gt;&lt;/STRONG&gt;AER&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;""&lt;/STRONG&gt;&lt;/FONT&gt;}, 'CCST'[Category])&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;EVALUATE&lt;BR /&gt;TOPN(&lt;BR /&gt;501,&lt;BR /&gt;SUMMARIZECOLUMNS(&lt;BR /&gt;ROLLUPADDISSUBTOTAL(&lt;BR /&gt;'CSST'[Category], ""IsGrandTotalRowTotal"",&lt;BR /&gt;'CSST'[Client], &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;""&lt;/FONT&gt;&lt;/STRONG&gt;IsDM0Total&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;""&lt;/FONT&gt;&lt;/STRONG&gt;,"&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 21:30:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2212700#M21935</guid>
      <dc:creator>d_gosbell</dc:creator>
      <dc:date>2021-11-29T21:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2222856#M22026</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/109790"&gt;@d_gosbell&lt;/a&gt;&amp;nbsp; Yes its a bit tricky on building this codeI will try this approach. I have 10 parameter to be created. Hopefully I can build this report which i'm a little bit late on my deadlines. This is my first time to create a report in PBI report builder using DAX Query Performance Analyzer.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 12:32:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2222856#M22026</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-06T12:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2226748#M22089</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp; Any updates?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 03:20:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2226748#M22089</guid>
      <dc:creator>v-janeyg-msft</dc:creator>
      <dc:date>2021-12-08T03:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2226875#M22090</link>
      <description>&lt;P&gt;Im still working on.&amp;nbsp; find some error. im not sure if the quotation i put is correct.&amp;nbsp; below are some of the code which i'm not sure where to put the quotation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;__DS0FilterTable3,&lt;BR /&gt;"Qty", CALCULATE(SUM('&lt;SPAN&gt;CSST&lt;/SPAN&gt;'[Qty])),&lt;BR /&gt;"Good", '&lt;SPAN&gt;CSST&lt;/SPAN&gt;'[Good],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;),&lt;BR /&gt;[IsGrandTotalRowTotal],&lt;BR /&gt;1,&lt;BR /&gt;'&lt;SPAN&gt;CSST&lt;/SPAN&gt;'[Category],&lt;BR /&gt;1,&lt;BR /&gt;[IsDM0Total],&lt;BR /&gt;1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ORDER BY&lt;BR /&gt;[IsGrandTotalRowTotal],&lt;BR /&gt;'&lt;SPAN&gt;CSST&lt;/SPAN&gt;'[Category],&lt;BR /&gt;[IsDM0Total],&lt;BR /&gt;'&lt;SPAN&gt;CSST&lt;/SPAN&gt;'[Client],&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 05:42:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2226875#M22090</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-08T05:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2227335#M22099</link>
      <description>&lt;P&gt;HI,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having an error&amp;nbsp; could not figure out on where to put the quotes&amp;nbsp; which I used your sample. Anyway, I'm insert new DAX Query and optimize some of the column to shorten the code.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DEFINE
  VAR __DS0FilterTable = 
    TREATAS({2021}, 'DateTable'[Received])

  VAR __DS0FilterTable2 = 
    TREATAS({"November"}, 'CCST'[MonthName])

  VAR __DS0FilterTable3 = 
    TREATAS({"LEGACY"}, 'CCST'[Model])

  VAR __DS0FilterTable4 = 
    TREATAS({"DIY"}, 'CCST'[Type])

  VAR __DS0FilterTable5 = 
    TREATAS({"Normal"}, 'CCST'[Status])

  VAR __DS0FilterTable6 = 
    TREATAS({"OTHERS"}, 'CCST'[Category])

EVALUATE
  TOPN(
    501,
    SUMMARIZECOLUMNS(
      ROLLUPADDISSUBTOTAL(
        'LocalDateTable_9a516b7e-ac4d-49d6-a22c-5318bf076cd8'[Year], "IsGrandTotalRowTotal",
        ROLLUPGROUP(
          'LocalDateTable_9a516b7e-ac4d-49d6-a22c-5318bf076cd8'[Month],
          'LocalDateTable_9a516b7e-ac4d-49d6-a22c-5318bf076cd8'[MonthNo]
        ), "IsDM0Total"
      ),
      __DS0FilterTable,
      __DS0FilterTable2,
      __DS0FilterTable3,
      __DS0FilterTable4,
      __DS0FilterTable5,
      __DS0FilterTable6,
      "SumReceived", CALCULATE(SUM('CCST'[Qty])),
      "Good", 'CCST'[Good],
      "Good__", 'CCST'[Good %]
    ),
    [IsGrandTotalRowTotal],
    1,
    'LocalDateTable_9a516b7e-ac4d-49d6-a22c-5318bf076cd8'[Year],
    1,
    [IsDM0Total],
    1,
    'LocalDateTable_9a516b7e-ac4d-49d6-a22c-5318bf076cd8'[MonthNo],
    1,
    'LocalDateTable_9a516b7e-ac4d-49d6-a22c-5318bf076cd8'[Month],
    1
  )

ORDER BY
  [IsGrandTotalRowTotal],
  'LocalDateTable_9a516b7e-ac4d-49d6-a22c-5318bf076cd8'[Year],
  [IsDM0Total],
  'LocalDateTable_9a516b7e-ac4d-49d6-a22c-5318bf076cd8'[MonthNo],
  'LocalDateTable_9a516b7e-ac4d-49d6-a22c-5318bf076cd8'[Month]&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 09:30:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2227335#M22099</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-08T09:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2229145#M22123</link>
      <description>&lt;P&gt;So the basic order of operations for building a query as an expression is as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) you create a new data set and link it to a connection.&lt;/P&gt;
&lt;P&gt;2) then you click the fx button to open the expression editor&lt;/P&gt;
&lt;P&gt;3) then you start the expression with an equals and an opening double quote character eg.&amp;nbsp; ="&amp;nbsp;&lt;BR /&gt;4) then I normally open a text editor paste my query in there and do a global search for any double quote characters " and replace them with 2 double quote characters ""&lt;/P&gt;
&lt;P&gt;5) then you paste in your query and at the end you add a closing double quote character "&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;="DEFINE
  VAR __DS0FilterTable = 
    TREATAS({2021}, 'DateTable'[Received])

  VAR __DS0FilterTable2 = 
    TREATAS({""November""}, 'CCST'[MonthName])

  VAR __DS0FilterTable3 = 
    TREATAS({""LEGACY""}, 'CCST'[Model])

  VAR __DS0FilterTable4 = 
    TREATAS({""DIY""}, 'CCST'[Type])

  VAR __DS0FilterTable5 = 
    TREATAS({""Normal""}, 'CCST'[Status])

  VAR __DS0FilterTable6 = 
    TREATAS({""OTHERS""}, 'CCST'[Category])

EVALUATE
  TOPN(
    501,
    SUMMARIZECOLUMNS(
      ROLLUPADDISSUBTOTAL(
        'LocalDateTable_9a516b7e-ac4d-49d6-a22c-5318bf076cd8'[Year], ""IsGrandTotalRowTotal"",
        ROLLUPGROUP(
          'LocalDateTable_9a516b7e-ac4d-49d6-a22c-5318bf076cd8'[Month],
          'LocalDateTable_9a516b7e-ac4d-49d6-a22c-5318bf076cd8'[MonthNo]
        ), ""IsDM0Total""
      ),
      __DS0FilterTable,
      __DS0FilterTable2,
      __DS0FilterTable3,
      __DS0FilterTable4,
      __DS0FilterTable5,
      __DS0FilterTable6,
      ""SumReceived"", CALCULATE(SUM('CCST'[Qty])),
      ""Good"", 'CCST'[Good],
      ""Good__"", 'CCST'[Good %]
    ),
    [IsGrandTotalRowTotal],
    1,
    'LocalDateTable_9a516b7e-ac4d-49d6-a22c-5318bf076cd8'[Year],
    1,
    [IsDM0Total],
    1,
    'LocalDateTable_9a516b7e-ac4d-49d6-a22c-5318bf076cd8'[MonthNo],
    1,
    'LocalDateTable_9a516b7e-ac4d-49d6-a22c-5318bf076cd8'[Month],
    1
  )

ORDER BY
  [IsGrandTotalRowTotal],
  'LocalDateTable_9a516b7e-ac4d-49d6-a22c-5318bf076cd8'[Year],
  [IsDM0Total],
  'LocalDateTable_9a516b7e-ac4d-49d6-a22c-5318bf076cd8'[MonthNo],
  'LocalDateTable_9a516b7e-ac4d-49d6-a22c-5318bf076cd8'[Month]
  "&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the above is just a hard coded expression, to incorporate parameters in you would take the exising hard coded filters and replace them. So the following month filter&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;    TREATAS({""November""}, 'CCST'[MonthName])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;would become something like the following to manually join in the value from a parameter called Month&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;    TREATAS({"""  + Parameters!Month.Value + """}, 'CCST'[MonthName])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2021 02:42:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2229145#M22123</guid>
      <dc:creator>d_gosbell</dc:creator>
      <dc:date>2021-12-09T02:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2229571#M22129</link>
      <description>&lt;P&gt;Thank you very much.&amp;nbsp; By the way, I have another post. about on how to remove the restriction to topN 501 and removed the sub subtotal and Grand Total. Need only the summary.&amp;nbsp; Kindly take a look my other post. Thanks again.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2021 07:41:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2229571#M22129</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-09T07:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2231392#M22143</link>
      <description>&lt;P&gt;This is what I did. I create a new dataset and click the properties then on the query type I paste the query and tried also to paste the query in expression(Fx). Click the fields properties then click the add select the query field and filled up the field source and fieldname which is coming from the query. then I run the the report and No data displayed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JWick1969_1-1639042957735.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/641610i68F1E6642988A0F6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JWick1969_1-1639042957735.png" alt="JWick1969_1-1639042957735.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JWick1969_2-1639043094523.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/641612i855DEE3DC1A3547C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JWick1969_2-1639043094523.png" alt="JWick1969_2-1639043094523.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 00:49:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2231392#M22143</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-10T00:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2231489#M22145</link>
      <description>&lt;P&gt;It will be throwing an error somewhere since expressions in the fields in Report Builder use VBA (since they need to be data source agnostic) and what you have there is DAX. I tend avoid using calculated fields in Report Builder where ever possible and put things like that into the query so that they get executed by the tabular engine which will give you much better performance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I actually missed a step in my workflow. I actually paste the un-altered query in and refresh the fields first, then I click the fx and turn it into an expression. That maps the query fields to fields in report builder which you can then drag and drop onto your report&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 01:54:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2231489#M22145</guid>
      <dc:creator>d_gosbell</dc:creator>
      <dc:date>2021-12-10T01:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2231718#M22148</link>
      <description>&lt;P&gt;I'm not experiencing an error. so far i encountered no data displayed on my report.&amp;nbsp; Imap the query field to field by copying the one from the query code.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 04:07:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2231718#M22148</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-10T04:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2231727#M22149</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I'm not experiencing an error. so far i encountered no data displayed on my report.&amp;nbsp; Imap the query field to field by copying the one from the query code.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This will be the cause of your problem. Because of the way Report Builder executes dax queries certain characters in the fields names get replaced with underscores. So if you have not mapped using the correctly encoded names you will just get an empty string in your fields. So if you have asked for the field "[Sales Amount]" but the query engine in Report Builder returns it as "__Sales_Amount__" then your dataset will contain rows, but all the fields will be blank.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is much easier to use the approach I suggested in my previous reply and paste in the raw query first and let Report Builder generate the field mappings before you turn your query into an expression.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 04:24:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2231727#M22149</guid>
      <dc:creator>d_gosbell</dc:creator>
      <dc:date>2021-12-10T04:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2232132#M22151</link>
      <description>&lt;P&gt;Thank you for sharing this technique and I learned new knowledge on PowerBI report builder. I followed your approach and there's already data displayed on the report.&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 08:59:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2232132#M22151</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-10T08:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2236744#M22183</link>
      <description>&lt;P&gt;The report is already working if i choose one year data. but i'm having issues if i pulled data three years data. I have 33 columns on my report.&amp;nbsp; May I know what are the fixes should I do in regards with this error. Thanks. by the way, below is the error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Resource Governing: This query uses more memory than the configured limit.&lt;BR /&gt;The query — or calculations referenced by it — might be too memory-intensive to run.&lt;BR /&gt;To run this query, you could simplify the query or its calculations, or reach out to your capacity administrator to see if they can increase the per-query memory limit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 01:45:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2236744#M22183</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-14T01:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2236976#M22187</link>
      <description>&lt;P&gt;So the two possible fixes for this are spelled out in the error message itself.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;To run this query, you could simplify the query or its calculations, or reach out to your capacity administrator to see if they can increase the per-query memory limit.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As long as you are not trying to export millions of records the issue is most likely one of your measures requiring a lot of memory to calculate.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest copying your query out to something like DAX Studio or SSMS where you can easily modify it an run it repeatedly. Then comment out all your measures and include a simple measure like one that is just a SUM of a single column or a COUNTROWS. If the query works with a simple measure then gradually add your other measures back in one at a time until you find which one(s) cause the issue. The you will need to see if you can re-write / optimize those.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 03:56:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2236976#M22187</guid>
      <dc:creator>d_gosbell</dc:creator>
      <dc:date>2021-12-14T03:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2237619#M22196</link>
      <description>&lt;P&gt;Thank you for your reply. by the way, I notice one of my parameter. I'm selecting all the values meaning i have 30 values and it show all the 30 items in my report parameter&amp;nbsp; if i choose (select All), How can i display only the "All" on my Report.&amp;nbsp; curretnly i did like this in my parameter expression&amp;nbsp;=Join(Parameters!Year.Value,",").&lt;/P&gt;&lt;P&gt;'&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 09:52:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2237619#M22196</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-14T09:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2239028#M22199</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you for your reply. by the way, I notice one of my parameter. I'm selecting all the values meaning i have 30 values and it show all the 30 items in my report parameter&amp;nbsp; if i choose (select All), How can i display only the "All" on my Report.&amp;nbsp; curretnly i did like this in my parameter expression&amp;nbsp;=Join(Parameters!Year.Value,",").&lt;/P&gt;
&lt;P&gt;'&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You could check in your expression if the number of values selected in the parameter matches the number of rows in the dataset you use to populate the parameter. So the expression would look something like the following, you would just need to change the field name and dataset names in red to match those in your report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=iif( Parameters!Year.Value.Length = Count(Fields!&lt;FONT color="#FF0000"&gt;Year&lt;/FONT&gt;.Value, "&lt;FONT color="#FF0000"&gt;YearDataSet&lt;/FONT&gt;"), "ALL", Join(Parameters!Year.Value, ","))&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 21:58:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2239028#M22199</guid>
      <dc:creator>d_gosbell</dc:creator>
      <dc:date>2021-12-14T21:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Report Builder - DAX Query from  Performance analyzer multiple parameter values issue</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2303852#M22651</link>
      <description>&lt;P&gt;I have a similiar case but instead of using parameters for the filter I want to use parameters to dynamically bring a different field. The problem with that is that summrize columns does not give aliases to the columns So I wouldn't know what to name it in the Fields section. I tried Nesting SelectedColumns on top of Summarize but then I would get empty values for "Actuals" column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;="DEFINE

  VAR __DS0Core = 
    SUMMARIZECOLUMNS(

          'Dim_Acc'[GEN_MEMBER3_DESC],
          'Dim_Acc'[GEN_MEMBER4_DESC],
          'Dim_Acc'[GEN_MEMBER4_ID],
          'Dim_Acc'[GEN_MEMBER5_DESC],
          'Dim_Acc'[GEN_MEMBER5_ID],
          'Dim_CostCenter'[Segment ID Desc],
          ("""  + Parameters!Field.Value + """),
      ""Actuals MTD"", 'Financial_Measures'[Actuals MTD]
    )


EVALUATE
  __DS0Core

"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="emartes_0-1643234974521.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/661298i14D7B361597367E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="emartes_0-1643234974521.png" alt="emartes_0-1643234974521.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 22:10:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-Bi-Report-Builder-DAX-Query-from-Performance-analyzer/m-p/2303852#M22651</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-26T22:10:28Z</dc:date>
    </item>
  </channel>
</rss>

