Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
MP-iCONN
Resolver I
Resolver I

Export to file for Paginated report Parameter issue

I posted this in the Power Automate Forums but thought I would post here as well since it deals with Power BI reports.

 

I have a Power BI Paginated Report I created for AR Aging by Sales Rep and Customer Name showing the Customers Balance and how many days they are past due.  I have about 14 Sales Reps so I am creating one flow for all of them.  We want to just email each Sales Rep separately that is tied to them for the Customer Name.  So one master flow.

 

The first step will be the Export To File for Paginated Reports then I added the Workspace, the Report, the file extension of .XLSX and finally a Parameter called ARInvoicesSalesRep and then the value for the Sales Reps name (For example Jack Johnson).  I then will go on to create a file in One Drive and then email that out.

 

My issue is I want to create a flow step for each one of my Sales Reps in this Flow and if for any reason there isn't a record don't fail the entire flow process.  There may be at times the Sales Rep do not have any Customers that are past due.  Is there anyway to create some sort of "IF Sales Rep doesn't return a record continue the flow".

 

MPiCONN_0-1670086515186.png

 

Any Advice would be greatly appreciated.

 

Thank you.

1 ACCEPTED SOLUTION

I was able to figure out how to relate the Dim and Fact tables in the Paginated Report using the following in my paginated query:

 

FILTER ( VALUES ('Dim_SalesReps'[Sales Rep] ), PATHCONTAINS (@DimSalesRep, 'Dim_SalesReps'[Sales Rep]))

 

To also make this work I had to include a measure from the fact table.  Again this is just for the relations portion.  For now I will just use this to send out a blank attachments if no records exists rather than kill the entire work flow.

View solution in original post

3 REPLIES 3
GilbertQ
Super User
Super User

Hi @MP-iCONN 

 

Could you not get all the data required into an Excel spreadsheet and then do a For each loop and get the customer ID and associated Sales Rep email address to then send it out per Sales Rep?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Unfortunately I do not have a clue on how to do that.

 

I do have somewhat of a solution that involves creating a Dimension table for all the Sales Reps as a Parameter in my paginated report so that no matter what a file will be created even if they do not have any customers with amounts past due.  Basically it would generate an excel file with no results in it.

 

The issue is I am struggling to get a relationship between those two tables in the paginated report.  In my power BI dataset I had no issue creating a relationship, just can't figure out how to do it in the paginated report.

 

Tables:

Dim_SalesReps

Fact_AR_Invoices

I was able to figure out how to relate the Dim and Fact tables in the Paginated Report using the following in my paginated query:

 

FILTER ( VALUES ('Dim_SalesReps'[Sales Rep] ), PATHCONTAINS (@DimSalesRep, 'Dim_SalesReps'[Sales Rep]))

 

To also make this work I had to include a measure from the fact table.  Again this is just for the relations portion.  For now I will just use this to send out a blank attachments if no records exists rather than kill the entire work flow.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.