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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors