Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have a report of account receivables and in the end I want to send 4 different tables via email to different sales representatives.
Understandably I want to send each sales representative a table of only their customers.
I found a great video how to do this in Power Automate: https://www.youtube.com/watch?v=tbNvNk11sXM
Jason uses "Run a query against a dataset" option and copies the query of specific visual from Performance analyzer.
My query would like this (I deleted all parts of the code that are not important):
// DAX Query
DEFINE
VAR __DS0FilterTable =
TREATAS({"Sales representative A"}, 'Reps table'[Rep])
VAR __DS0FilterTable2 =
FILTER(
KEEPFILTERS(VALUES('My measure'[Measure])),
''My measure'[Measure] = 10
)
VAR __ValueFilterDM1 =
FILTER(
"these are not important parameters"
)
The only important part is the first TREATAS function, where Sales representative A is selected. Suppose I have 5 Sales representatives, I could create 5 static power automate buttons and each of them would contain a query for the specific sales representative. But is there any way how to make one dynamic flow in power automate that would change the query parameters based on a slicer value selected? I don't know if I can use a variable in a power automate query.
Hi @Petanek333 ,
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it.
Best regards,
Community Support Team_Binbin Yu
Hi @Anonymous I did not have time to try it yet. I hope to get to it in a couple of days and will respond hopefully with accepting as solution 🙂
You can pass dynamic content into the DAX Query to use as the string for the sales representative. It might look like this if it's coming from a variable:
If you have trouble, I'd recommend the Power Automate forums rather than the Power BI forums for troubleshooting how to make the dynamic content work.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
71 | |
38 | |
28 | |
26 |
User | Count |
---|---|
99 | |
88 | |
62 | |
42 | |
39 |