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.
I have a master report with a few subreports. I want to run a subreport based on a parameter from the master report. Any idea how to do it?
Thanks
@v-zhangti If I just hide subreport it still runs. Even if I run its query conditionally based on a parameter some processing still takes place. That is confusing to users. Their expectation is that is they dont select reports to run nothing at all should be happening on the screen.
Hi, @Markzolotoy
To conditionally execute a subreport based on a parameter from the master report in a paginated report, you can use a visibility expression. Here's how:
This expression will hide the subreport if the parameter value is "True", and show it if the parameter value is anything else.
Note that if the subreport is not pulling data and not visible when the parameter value is "False", you may need to adjust the subreport's query or data source to handle this case. You could also consider using a default value for the parameter that ensures the subreport always runs, but only displays data when the parameter value is set appropriately.
Subreports in Power BI paginated reports - Power BI | Microsoft Learn
Add a subreport and parameters to a Power BI paginated report - Power BI | Microsoft Learn
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
What I actually meant is that in case not to run it the subreport is not pulling data and it's not visible. My data source is a PowerBI dataset.