DEFINE VAR StartDate = @ReportParameterStartDate VAR EndDate = @ReportParameterEndDate EVALUATE SUMMARIZECOLUMNS( 'Date'[Year], 'Product'[Category], "Total Sales", CALCULATE( [Total Sales], DATESBETWEEN( 'Date'[Date], StartDate, EndDate ) ), "Previous Year", CALCULATE( [Total Sales], SAMEPERIODLASTYEAR( 'Date'[Date] ) ) ) ORDER BY 'Date'[Year] DESC, 'Product'[Category]
Print Safe Measure = IF( HASONEVALUE( ‘Product’[Name] ), [Actual Measure], "Multiple Products Selected" ) You have a dynamic title: "Sales Report for " & SELECTEDVALUE(‘Territory’[Region], “All Regions”) . This is beautiful in the service. In the PDF snapshot, it works—but only if a territory was selected at export time.
In Paginated Reports, use report parameters (passed via URL or default values) to drive both the data query and the text box titles. Keep your DAX for numbers; keep your text for strings. Best Practices for the DAX-to-PDF Pipeline After years of debugging why "the PDF numbers don't match the dashboard," here is my golden workflow: Step 1: Create a "PDF Mode" Switch Add a disconnected parameter table to your model. Create a measure: PDF Mode = IF( SELECTEDVALUE( ‘Export Mode’[Mode] ) = “PDF”, 1, 0 ) . Then wrap your complex measures:
By [Your Name/Team]
DEFINE VAR StartDate = @ReportParameterStartDate VAR EndDate = @ReportParameterEndDate EVALUATE SUMMARIZECOLUMNS( 'Date'[Year], 'Product'[Category], "Total Sales", CALCULATE( [Total Sales], DATESBETWEEN( 'Date'[Date], StartDate, EndDate ) ), "Previous Year", CALCULATE( [Total Sales], SAMEPERIODLASTYEAR( 'Date'[Date] ) ) ) ORDER BY 'Date'[Year] DESC, 'Product'[Category]
Print Safe Measure = IF( HASONEVALUE( ‘Product’[Name] ), [Actual Measure], "Multiple Products Selected" ) You have a dynamic title: "Sales Report for " & SELECTEDVALUE(‘Territory’[Region], “All Regions”) . This is beautiful in the service. In the PDF snapshot, it works—but only if a territory was selected at export time.
In Paginated Reports, use report parameters (passed via URL or default values) to drive both the data query and the text box titles. Keep your DAX for numbers; keep your text for strings. Best Practices for the DAX-to-PDF Pipeline After years of debugging why "the PDF numbers don't match the dashboard," here is my golden workflow: Step 1: Create a "PDF Mode" Switch Add a disconnected parameter table to your model. Create a measure: PDF Mode = IF( SELECTEDVALUE( ‘Export Mode’[Mode] ) = “PDF”, 1, 0 ) . Then wrap your complex measures:
By [Your Name/Team]