<?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: PBI Report Builder - Subreport with Parameters in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/PBI-Report-Builder-Subreport-with-Parameters/m-p/4722443#M41003</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/422387"&gt;@dkernen2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-pm-slice="0 0 []"&gt;You’re on the right track by using subreports for pagination, but performance suffers unless the subreport DAX query is filtered by a parameter. By adding a FILTER() clause using @RequestName in the subreport’s DAX query, you ensure only the required data is retrieved. This mimics a WHERE clause and drastically improves performance — especially if the main dataset is large.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if you want help constructing a specific version of your DAX query or want to explore alternatives to subreports.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DEFINE
    VAR __RequestNameParam = @RequestName -- This will be injected by SSRS
    VAR __FilteredTable = 
        FILTER(
            'Grant Applications',
            'Grant Applications'[Request Name] = __RequestNameParam
        )

    VAR __DS0Core =
        SUMMARIZECOLUMNS(
            'Grant Applications'[Organization Name],
            'Grant Applications'[Amount Recommended],
            'Grant Applications'[Request State Description],
            'Grant Awards'[Awards],
            'Grant Awards'[Awarded],
            'Grant Applications'[Request Name],
            'Grant Applications'[Amount Requested],
            'Grant Applications'[Organization Budget],
            'Grant Applications'[Duration In Months],
            'Grant Applications'[Grant Cycle],
            'Grant Applications'[Workflow Class],
            'Grant Applications'[City],
            'Grant Applications'[State Code],
            'Grant Applications'[Internal Project Summary],
            'Grant Applications'[Rubric Rationale Potential Impact],
            'Grant Applications'[Overall Project Amount],
            'Grant Applications'[Strategy],
            'Grant Applications'[Cap Bldg Type],
            'Grant Applications'[Grant Start Date],
            'Grant Applications'[Grant End Date],
            "R1_R2_Score__Either_IO_", 'Measures Table'[R1+R2 Score (Either IO)],
            "Grant_Applications", 'Measures Table'[Grant Applications]
        ,
            __FilteredTable
        )
EVALUATE
    __DS0Core
&lt;/LI-CODE&gt;
&lt;P data-pm-slice="0 0 []"&gt;@RequestName is a report parameter, injected dynamically.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;__FilteredTable filters 'Grant Applications' to only the relevant row(s).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SUMMARIZECOLUMNS is scoped to this filtered table, so the subreport processes only what it needs, significantly improving performance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;If Using More Than One Filter:&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR __FilteredTable = 
    FILTER(
        'Grant Applications',
        'Grant Applications'[Request Name] = @RequestName &amp;amp;&amp;amp;
        'Grant Applications'[Organization Name] = @OrgName
    )
&lt;/LI-CODE&gt;
&lt;P data-pm-slice="0 0 []"&gt;Make sure the parameter @RequestName is exactly the same type as the field (Request Name). Sometimes SSRS sends it as text while the field may be nvarchar with trailing spaces — use TRIM() if needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Always test the DAX query in DAX Studio or SSMS connected to the semantic model to make sure it's returning results fast with the parameter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jun 2025 06:03:09 GMT</pubDate>
    <dc:creator>Poojara_D12</dc:creator>
    <dc:date>2025-06-06T06:03:09Z</dc:date>
    <item>
      <title>PBI Report Builder - Subreport with Parameters</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/PBI-Report-Builder-Subreport-with-Parameters/m-p/4721993#M40997</link>
      <description>&lt;P&gt;Hi.&amp;nbsp; I need some help.&amp;nbsp; I have a report that has several row groups.&amp;nbsp; The detail rows have multiple rows, so, after many attempts at KeepTogether, it's become clear to me that, to keep the detail for one record on the same page, I need to use a subreport.&amp;nbsp; (I understand that KeepTogether only works for 2 rows, and my detail in this report is 8 rows.)&lt;BR /&gt;&lt;BR /&gt;The only reason I have a subreport is because of the pagination.&amp;nbsp; The report and sub-report come from the same table with this DAX query:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DEFINE
VAR __DS0Core = 
		SUMMARIZECOLUMNS(
			'Grant Applications'[Organization Name],
			'Grant Applications'[Amount Recommended],
			'Grant Applications'[Request State Description],
			'Grant Awards'[Awards],
			'Grant Awards'[Awarded],
			'Grant Applications'[Request Name],
			'Grant Applications'[Amount Requested],
			'Grant Applications'[Organization Budget],
			'Grant Applications'[Duration In Months],
			'Grant Applications'[Grant Cycle],
			'Grant Applications'[Workflow Class],
			'Grant Applications'[City],
			'Grant Applications'[State Code],
			'Grant Applications'[Internal Project Summary],
			'Grant Applications'[Rubric Rationale Potential Impact],
			'Grant Applications'[Overall Project Amount],
			'Grant Applications'[Strategy],
			'Grant Applications'[Cap Bldg Type],
			'Grant Applications'[Grant Start Date],
			'Grant Applications'[Grant End Date],
			"R1_R2_Score__Either_IO_", 'Measures Table'[R1+R2 Score (Either IO)],
                        "Grant_Applications", 'Measures Table'[Grant Applications]
		)

EVALUATE
	__DS0Core&lt;/LI-CODE&gt;&lt;P&gt;When I run the report with the subreport the way I have it currently set up, it runs incredibly slowly, so I certainly do not have it set up correctly.&amp;nbsp; I wonder if my query should be different in the subreport to utilize the parameter passed from the report.&amp;nbsp; I do not recall how to pass the parameter to the subreport and have it process quickly.&amp;nbsp; I've done this successfully in SQL in the WHERE clause, but I am uncertain how to do this using DAX.&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;BR /&gt;The RDL files are here: SUB:&amp;nbsp;&lt;A href="https://kauffman.box.com/s/41lz8o7z23txp3wnge13wx9m8azv5y0a" target="_blank"&gt;https://kauffman.box.com/s/41lz8o7z23txp3wnge13wx9m8azv5y0a&lt;/A&gt;&lt;BR /&gt;MAIN:&amp;nbsp;&lt;A href="https://kauffman.box.com/s/armbiu1r7iettb2ge3vchqt1p77kqrvg" target="_blank"&gt;https://kauffman.box.com/s/armbiu1r7iettb2ge3vchqt1p77kqrvg&lt;/A&gt;&lt;BR /&gt;@reportbuilder&amp;nbsp;@subreport&amp;nbsp;@parameters&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 19:56:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/PBI-Report-Builder-Subreport-with-Parameters/m-p/4721993#M40997</guid>
      <dc:creator>dkernen2</dc:creator>
      <dc:date>2025-06-05T19:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: PBI Report Builder - Subreport with Parameters</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/PBI-Report-Builder-Subreport-with-Parameters/m-p/4722443#M41003</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/422387"&gt;@dkernen2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-pm-slice="0 0 []"&gt;You’re on the right track by using subreports for pagination, but performance suffers unless the subreport DAX query is filtered by a parameter. By adding a FILTER() clause using @RequestName in the subreport’s DAX query, you ensure only the required data is retrieved. This mimics a WHERE clause and drastically improves performance — especially if the main dataset is large.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if you want help constructing a specific version of your DAX query or want to explore alternatives to subreports.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DEFINE
    VAR __RequestNameParam = @RequestName -- This will be injected by SSRS
    VAR __FilteredTable = 
        FILTER(
            'Grant Applications',
            'Grant Applications'[Request Name] = __RequestNameParam
        )

    VAR __DS0Core =
        SUMMARIZECOLUMNS(
            'Grant Applications'[Organization Name],
            'Grant Applications'[Amount Recommended],
            'Grant Applications'[Request State Description],
            'Grant Awards'[Awards],
            'Grant Awards'[Awarded],
            'Grant Applications'[Request Name],
            'Grant Applications'[Amount Requested],
            'Grant Applications'[Organization Budget],
            'Grant Applications'[Duration In Months],
            'Grant Applications'[Grant Cycle],
            'Grant Applications'[Workflow Class],
            'Grant Applications'[City],
            'Grant Applications'[State Code],
            'Grant Applications'[Internal Project Summary],
            'Grant Applications'[Rubric Rationale Potential Impact],
            'Grant Applications'[Overall Project Amount],
            'Grant Applications'[Strategy],
            'Grant Applications'[Cap Bldg Type],
            'Grant Applications'[Grant Start Date],
            'Grant Applications'[Grant End Date],
            "R1_R2_Score__Either_IO_", 'Measures Table'[R1+R2 Score (Either IO)],
            "Grant_Applications", 'Measures Table'[Grant Applications]
        ,
            __FilteredTable
        )
EVALUATE
    __DS0Core
&lt;/LI-CODE&gt;
&lt;P data-pm-slice="0 0 []"&gt;@RequestName is a report parameter, injected dynamically.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;__FilteredTable filters 'Grant Applications' to only the relevant row(s).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SUMMARIZECOLUMNS is scoped to this filtered table, so the subreport processes only what it needs, significantly improving performance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;If Using More Than One Filter:&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR __FilteredTable = 
    FILTER(
        'Grant Applications',
        'Grant Applications'[Request Name] = @RequestName &amp;amp;&amp;amp;
        'Grant Applications'[Organization Name] = @OrgName
    )
&lt;/LI-CODE&gt;
&lt;P data-pm-slice="0 0 []"&gt;Make sure the parameter @RequestName is exactly the same type as the field (Request Name). Sometimes SSRS sends it as text while the field may be nvarchar with trailing spaces — use TRIM() if needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Always test the DAX query in DAX Studio or SSMS connected to the semantic model to make sure it's returning results fast with the parameter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 06:03:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/PBI-Report-Builder-Subreport-with-Parameters/m-p/4722443#M41003</guid>
      <dc:creator>Poojara_D12</dc:creator>
      <dc:date>2025-06-06T06:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: PBI Report Builder - Subreport with Parameters</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/PBI-Report-Builder-Subreport-with-Parameters/m-p/4723389#M41018</link>
      <description>&lt;P&gt;This is incredible.&amp;nbsp; I think I got it.&amp;nbsp; I did need to wrap a CALCULATETABLE around the SUMMARIZECOLUMNS to accept the filtered table.&amp;nbsp; Does that seem right?&lt;BR /&gt;&lt;BR /&gt;It takes a good 20 seconds to load, but this is a paginated report and it shouldn't be run that frequently anyway.&amp;nbsp; A single record runs very quickly in DAX Studio, but when I am running 200+ records through it and 200 subreports, it takes while.&amp;nbsp; Does that seem reasonable to take that long to load?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR __DS0Core = 
CALCULATETABLE(SUMMARIZECOLUMNS(
	'Grant Applications'[Request ID],
	'Grant Applications'[Request Name],
	'Grant Applications'[Grant Cycle],
	'Grant Applications'[Workflow Class],
	'Grant Applications'[Organization Name],
	'Grant Applications'[City],
	'Grant Applications'[State Code],
	'Grant Applications'[Organization Budget],
	'Grant Applications'[Amount Requested],
	'Grant Applications'[Amount Recommended],
	'Grant Applications'[Request State Description],
	'Grant Applications'[Duration In Months],
	'Grant Applications'[Internal Project Summary],
	'Grant Applications'[Rubric Rationale Potential Impact],
	'Grant Applications'[Overall Project Amount],
	'Grant Applications'[Strategy],
	'Grant Applications'[Cap Bldg Type],
	'Grant Awards'[Awards],
	'Grant Awards'[Awarded],
	"R1_R2_Score__Either_IO_", 'Measures Table'[R1+R2 Score (Either IO)],
	"Grant_Applications", 'Measures Table'[Grant Applications])
,
__FilteredTable
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 16:01:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/PBI-Report-Builder-Subreport-with-Parameters/m-p/4723389#M41018</guid>
      <dc:creator>dkernen2</dc:creator>
      <dc:date>2025-06-06T16:01:23Z</dc:date>
    </item>
  </channel>
</rss>

