How to create a Word report using PowerBI as a data source in Mail & Deploy using DAX queries (with example)?

How to create a Word report using PowerBI as a data source in Mail & Deploy using DAX queries (with example)?

FIRST CREATED ON 11 Aug 2025  I  AUTHOR Emma Camacho


Creating an Word report using a PowerBI as a data source in Mail & Deploy allows you to leverage powerful data analysis capabilities. Here's an example to help you get started:

Use case
Design a Store Analysis Report for a specific Store.

Mail & Deploy Report
The output Report looks like this:


How to get there?

PowerBI Server Database datasource

How to configure a PowerBI Datasource in version 3.6 and higher?

This example uses the PowerBI report Sales & Returns Sample. You can find it here: Sales & Returns Sample v201912.pbix.

Datasource definition



Report Template



The template is attached to this article.

PARAMETERS

Datasource
"M&D Demo_Sales & Returns Sample v201912"
This is the name of the Datasource used in the M&D Datasource definition and it is used to ease the use of the function EvaluateDaxOrDmvDatasourceExpression.


Store
"Contoso"
This is the parameter that defines the Store to be filtered to.

ELEMENTS

NetSales
format( EvaluateDaxOrDmvDatasourceExpression( [ReportParameter].[Datasource],  "EVALUATE { CALCULATE([Net Sales],Store[Store]="""&[ReportParameter].[Store] &""")}", 0  ), "$ ##,##0" )

Units Sold
format( EvaluateDaxOrDmvDatasourceExpression( [ReportParameter].[Datasource],  "EVALUATE { CALCULATE([Units Sold],Store[Store]="""&[ReportParameter].[Store] &""")}", 0  ), "$ ##,##0" )

Category Breakdown
Source: DAX/DMV Query
Query Datasource: M&D Demo_Sales & Returns Sample v201912
Query: "EVALUATE " &
" CALCULATETABLE( " &
" SUMMARIZECOLUMNS( 'Product'[Product] , ""Net Sales"", [Net Sales] ) ,Store[Store]=""" &[ReportParameter].[Store]& """) ORDER BY [Net Sales] ASC "
Insertion Mode:  Fill MSO Chart

Returns
format( EvaluateDaxOrDmvDatasourceExpression( [ReportParameter].[Datasource],  "EVALUATE { CALCULATE([Returns],Store[Store]="""&[ReportParameter].[Store] &""")}", 0  ), "$ ##,##0" )

Units Returned
format( EvaluateDaxOrDmvDatasourceExpression( [ReportParameter].[Datasource],  "EVALUATE { CALCULATE([Units Returned],Store[Store]="""&[ReportParameter].[Store] &""")}", 0  ), "$ ##,##0" )

Return Breakdown
Source: DAX/DMV Query
Query Datasource: M&D Demo_Sales & Returns Sample v201912
Query:  "EVALUATE " &
" CALCULATETABLE( " &
" SUMMARIZECOLUMNS( 'Product'[Product] , ""Returns"", [Returns] ) ,Store[Store]=""" &[ReportParameter].[Store]& """) ORDER BY [Returns] ASC "
Insertion Mode:  Fill MSO Chart

Today
Date.Now.Tostring("dd.MM.yyyy")

Looking for Additional Guidance?


If you require more detailed information or further assistance, please visit our comprehensive Online Documentation. Our resources are designed to help you navigate all features and functionalities effectively.