<?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 Run multiple queries during drilldown and use selected elements from visual in SQL-where clause in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Run-multiple-queries-during-drilldown-and-use-selected-elements/m-p/2664811#M25035</link>
    <description>&lt;P&gt;We are trying to use Power BI Desktop / Power BI report server to display results from a big data&lt;BR /&gt;warehouse realized in postgres. I am working on views to be used with Power BI, either with &amp;lt;DIRECT QUERY&amp;gt;&lt;BR /&gt;or &amp;lt;IMPORT MODE&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now my two questions are :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Is it only possible to run database Queries if one opens a power bi report or is it also possible&lt;BR /&gt;to run additional queries later during drilldowns from one page in a report to another page ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) During drilldown people normally select an element in a visual lets say with transaction monitoring&lt;BR /&gt;results. Then I would like to use the selected element for example in a matrix visual as input for&lt;BR /&gt;the where clause of another query which gives results of the next drilldown level. Is it possible ?&lt;BR /&gt;&lt;BR /&gt;Example for better understanding:&lt;BR /&gt;&lt;BR /&gt;I use query&lt;BR /&gt;&lt;BR /&gt;SELECT * FROM VIEW_WITH_WEEKLY_RESULTS .&lt;BR /&gt;&lt;BR /&gt;Then someone select the visual element with&lt;BR /&gt;&lt;BR /&gt;WORKFLOW = Workflow_7&lt;BR /&gt;and&lt;BR /&gt;ISO_WEEK_OF_YEAR = '2022-26'&lt;BR /&gt;&lt;BR /&gt;Now during drilldown I would like to run another SQL-statement like :&lt;BR /&gt;&lt;BR /&gt;SELECT * FROM VIEW_WITH_DAILY_RESULTS&lt;BR /&gt;WHERE&lt;BR /&gt;WORKFLOW = 'Workflow_7'&lt;BR /&gt;AND&lt;BR /&gt;ISO_WEEK_OF_YEAR = '2022-26'&lt;BR /&gt;&lt;BR /&gt;The idea is to reduce number of rows which will be returned from the query.&lt;BR /&gt;Also there are a lot of dimensions, where drilldown shall be possible&lt;BR /&gt;&lt;BR /&gt;Currently I am using Views like&lt;BR /&gt;&lt;BR /&gt;VIEW_WITH_WEEKLY_DAILY_RESULTS&lt;BR /&gt;VIEW_WITH_WEEKLY_DAILY_HOURLY_RESULTS&lt;BR /&gt;&lt;BR /&gt;which is very ineffective and gives bad performance even in medium size test environments.&lt;BR /&gt;&lt;BR /&gt;I would like to have Views&lt;BR /&gt;&lt;BR /&gt;VIEW_WITH_WEEKLY_RESULTS&lt;BR /&gt;VIEW_WITH_DAILY_RESULTS&lt;BR /&gt;VIEW_WITH_HOURLY_RESULTS&lt;/P&gt;&lt;P&gt;VIEW_WITH_INSTANCE_DATA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but only the first view shall be loaded completely to the power bi report , the other ones shall be used only with&lt;BR /&gt;where clauses reducing the data. I tried to use parameters, but was not able to get them into the where-clause of a query. From my background I am a database guy, not a power bi specialist.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 11:57:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-07-27T11:57:17Z</dc:date>
    <item>
      <title>Run multiple queries during drilldown and use selected elements from visual in SQL-where clause</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Run-multiple-queries-during-drilldown-and-use-selected-elements/m-p/2664811#M25035</link>
      <description>&lt;P&gt;We are trying to use Power BI Desktop / Power BI report server to display results from a big data&lt;BR /&gt;warehouse realized in postgres. I am working on views to be used with Power BI, either with &amp;lt;DIRECT QUERY&amp;gt;&lt;BR /&gt;or &amp;lt;IMPORT MODE&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now my two questions are :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Is it only possible to run database Queries if one opens a power bi report or is it also possible&lt;BR /&gt;to run additional queries later during drilldowns from one page in a report to another page ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) During drilldown people normally select an element in a visual lets say with transaction monitoring&lt;BR /&gt;results. Then I would like to use the selected element for example in a matrix visual as input for&lt;BR /&gt;the where clause of another query which gives results of the next drilldown level. Is it possible ?&lt;BR /&gt;&lt;BR /&gt;Example for better understanding:&lt;BR /&gt;&lt;BR /&gt;I use query&lt;BR /&gt;&lt;BR /&gt;SELECT * FROM VIEW_WITH_WEEKLY_RESULTS .&lt;BR /&gt;&lt;BR /&gt;Then someone select the visual element with&lt;BR /&gt;&lt;BR /&gt;WORKFLOW = Workflow_7&lt;BR /&gt;and&lt;BR /&gt;ISO_WEEK_OF_YEAR = '2022-26'&lt;BR /&gt;&lt;BR /&gt;Now during drilldown I would like to run another SQL-statement like :&lt;BR /&gt;&lt;BR /&gt;SELECT * FROM VIEW_WITH_DAILY_RESULTS&lt;BR /&gt;WHERE&lt;BR /&gt;WORKFLOW = 'Workflow_7'&lt;BR /&gt;AND&lt;BR /&gt;ISO_WEEK_OF_YEAR = '2022-26'&lt;BR /&gt;&lt;BR /&gt;The idea is to reduce number of rows which will be returned from the query.&lt;BR /&gt;Also there are a lot of dimensions, where drilldown shall be possible&lt;BR /&gt;&lt;BR /&gt;Currently I am using Views like&lt;BR /&gt;&lt;BR /&gt;VIEW_WITH_WEEKLY_DAILY_RESULTS&lt;BR /&gt;VIEW_WITH_WEEKLY_DAILY_HOURLY_RESULTS&lt;BR /&gt;&lt;BR /&gt;which is very ineffective and gives bad performance even in medium size test environments.&lt;BR /&gt;&lt;BR /&gt;I would like to have Views&lt;BR /&gt;&lt;BR /&gt;VIEW_WITH_WEEKLY_RESULTS&lt;BR /&gt;VIEW_WITH_DAILY_RESULTS&lt;BR /&gt;VIEW_WITH_HOURLY_RESULTS&lt;/P&gt;&lt;P&gt;VIEW_WITH_INSTANCE_DATA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but only the first view shall be loaded completely to the power bi report , the other ones shall be used only with&lt;BR /&gt;where clauses reducing the data. I tried to use parameters, but was not able to get them into the where-clause of a query. From my background I am a database guy, not a power bi specialist.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 11:57:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Run-multiple-queries-during-drilldown-and-use-selected-elements/m-p/2664811#M25035</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-27T11:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: Run multiple queries during drilldown and use selected elements from visual in SQL-where clause</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Run-multiple-queries-during-drilldown-and-use-selected-elements/m-p/2668392#M25058</link>
      <description>&lt;P&gt;Only possible in Direct Query mode.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 02:03:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Run-multiple-queries-during-drilldown-and-use-selected-elements/m-p/2668392#M25058</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-07-29T02:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: Run multiple queries during drilldown and use selected elements from visual in SQL-where clause</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Run-multiple-queries-during-drilldown-and-use-selected-elements/m-p/2668675#M25059</link>
      <description>&lt;P&gt;Hallo Ibendin,&lt;/P&gt;&lt;P&gt;thank your for your answer.&lt;/P&gt;&lt;P&gt;Can you point me to an URL, which describes how to do it&amp;nbsp; or give me a short description how to do it?&lt;/P&gt;&lt;P&gt;Especially I would be interested to know, where I can configure something for each query like :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Query execution time = When drilldown from page a to page b occurs / with selection&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For me it looks like somehow there is a builtin limitation for all queries&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Query execution time = When report is opened&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Maybe I am wrong and just do not know how to do it, because of my limited Power BI knowledge.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But if it would really not be possible that would be (from my point of view) a very serious Power BI report server missing functionality and we should think about staying with Business Objects ( which is more expensive but also powerful).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is it possible with Power BI Desktop / Power BI Report server or do I need other components?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I played around with the parameters in "Transform data part" but was not able to get parameters into my queries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for your answers in advance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Horst&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 06:51:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Run-multiple-queries-during-drilldown-and-use-selected-elements/m-p/2668675#M25059</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-29T06:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Run multiple queries during drilldown and use selected elements from visual in SQL-where clause</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Run-multiple-queries-during-drilldown-and-use-selected-elements/m-p/2669892#M25071</link>
      <description>&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters" target="_blank"&gt;Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Docs&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 16:09:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Run-multiple-queries-during-drilldown-and-use-selected-elements/m-p/2669892#M25071</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-07-29T16:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Run multiple queries during drilldown and use selected elements from visual in SQL-where clause</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Run-multiple-queries-during-drilldown-and-use-selected-elements/m-p/2687088#M25181</link>
      <description>&lt;P&gt;Thanks for the link to the m-query parameter article.&lt;BR /&gt;I am still busy trying to find out, if it will be useful for our special case.&lt;BR /&gt;Maybe I will come up with more specific questions or&amp;nbsp;feedback if it solved our requirements.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 10:43:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Run-multiple-queries-during-drilldown-and-use-selected-elements/m-p/2687088#M25181</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-08T10:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Run multiple queries during drilldown and use selected elements from visual in SQL-where clause</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Run-multiple-queries-during-drilldown-and-use-selected-elements/m-p/2691930#M25195</link>
      <description>&lt;P&gt;I came a bit closer to my goal creating an m-query for our postgres database using parameter, but the Postgres.Database function complains about a string, if it was produced with Text.Combine. What am I doing wrong here or is there a problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;see details :&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="m-query-with-parameter-giving-error.jpg" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/763008i979F2242E52EF491/image-size/large?v=v2&amp;amp;px=999" role="button" title="m-query-with-parameter-giving-error.jpg" alt="m-query-with-parameter-giving-error.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This m-query ,which has no syntax erros,&amp;nbsp; gives the following error, it looks like the postgres DB does not like the string made of substrings and parameter :&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="m-query-with-parameter-giving-error_details.jpg" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/763010i5837DA456FC6BA79/image-size/large?v=v2&amp;amp;px=999" role="button" title="m-query-with-parameter-giving-error_details.jpg" alt="m-query-with-parameter-giving-error_details.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if I use a string which was not a result of text.Combine then it works, the following works.&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="m-query-working.jpg" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/763012i06E3F918D4761421/image-size/large?v=v2&amp;amp;px=999" role="button" title="m-query-working.jpg" alt="m-query-working.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But I need Text.Combine to get my parameter in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong here ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;If some of you gurus sees my mistake, please give me a hint.&lt;/P&gt;&lt;P&gt;Many thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 09:15:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Run-multiple-queries-during-drilldown-and-use-selected-elements/m-p/2691930#M25195</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-10T09:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Run multiple queries during drilldown and use selected elements from visual in SQL-where clause</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Run-multiple-queries-during-drilldown-and-use-selected-elements/m-p/2692352#M25198</link>
      <description>&lt;P&gt;Text.From([P_ISO_Week_Of_Year])&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 11:19:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Run-multiple-queries-during-drilldown-and-use-selected-elements/m-p/2692352#M25198</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-08-10T11:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Run multiple queries during drilldown and use selected elements from visual in SQL-where clause</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Run-multiple-queries-during-drilldown-and-use-selected-elements/m-p/2703299#M25244</link>
      <description>&lt;P&gt;Hallo ,&lt;/P&gt;&lt;P&gt;recently I found some time to continue my evaluation of Power BI .&lt;/P&gt;&lt;P&gt;Your Text.From([Parameter]) gives an error see screenshot.&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="m-query-errors.Text.from.jpg" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/765955iB175E34D97275579/image-size/large?v=v2&amp;amp;px=999" role="button" title="m-query-errors.Text.from.jpg" alt="m-query-errors.Text.from.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I encode my parameter values with single quotes like P_ISO_WEEK_OF_YEAR = '2022-30'&lt;BR /&gt;then the m-query code works.&lt;/P&gt;&lt;P&gt;Currently I am having problems getting values into the parameter dynamically.&lt;/P&gt;&lt;P&gt;There are two things :&lt;/P&gt;&lt;P&gt;* I cannot use 'BIND to parameter' for a column,&amp;nbsp; because it is not available&lt;BR /&gt;in modelling columns -&amp;gt; Advanced part in my Power BI desktop for any table and any column, even&lt;BR /&gt;if I am using &amp;lt;Direct Query&amp;gt;.&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="pbi_modeling_properties_advanced_bindtoparameter_missing.jpg" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/765977i3BA5F93A4744BE13/image-size/large?v=v2&amp;amp;px=999" role="button" title="pbi_modeling_properties_advanced_bindtoparameter_missing.jpg" alt="pbi_modeling_properties_advanced_bindtoparameter_missing.jpg" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;* Also the "preview feature" is not available in my power bi desktop version under&lt;BR /&gt;&lt;BR /&gt;File -&amp;gt; Options and Settings -&amp;gt; Options&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="preview_feature_missing.jpg" style="width: 649px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/765981iE4FD9ED7C5B86290/image-size/large?v=v2&amp;amp;px=999" role="button" title="preview_feature_missing.jpg" alt="preview_feature_missing.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;It should be between &amp;lt;Diagnostics and Settings&amp;gt; and &amp;lt;Auto Recovery&amp;gt; according to some other posts but it is not there in my version.&lt;BR /&gt;&lt;BR /&gt;So my questions are :&lt;BR /&gt;&lt;BR /&gt;Is this "bind to parameter feature" not availabe for Power BI Desktop Version: 2.97.802.0 64-bit (September 2021) ?&lt;BR /&gt;&lt;BR /&gt;Unfortunately I receive Power BI Desktop with company software distribution, and they are always a bit behind in versions.&lt;BR /&gt;&lt;BR /&gt;Is this "bind to parameter feature" not availabe for Datasource = PostgreSQL 13 with mode = &amp;lt;Direct Query&amp;gt; ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why do I not have this "Preview option" in File -&amp;gt; Options and Settings -&amp;gt; Options ?&lt;BR /&gt;&lt;BR /&gt;Am I doing something wrong, which you could correct ?&lt;BR /&gt;&lt;BR /&gt;Many thanks for your answers in advance, Horst&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 13:42:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Run-multiple-queries-during-drilldown-and-use-selected-elements/m-p/2703299#M25244</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-16T13:42:52Z</dc:date>
    </item>
  </channel>
</rss>

