Forum Discussion
Data Set Parameter Not Being Passed to DB Query
- 8 years ago
Data preview for data sets with parameters has limitations (even when they rely on expressions), but the data sets should work fine once you use them from reports.
I assume you are designing a shared data set. Consider making the @CurrentUser parameter internal if you don't plan to override it from actual reports. Once the data set is saved you can test it by creating a report that uses it. Just build one in Report Builder and hit preview on the report itself.
Let me know if you still have problems with data sets.
Data preview for data sets with parameters has limitations (even when they rely on expressions), but the data sets should work fine once you use them from reports.
I assume you are designing a shared data set. Consider making the @CurrentUser parameter internal if you don't plan to override it from actual reports. Once the data set is saved you can test it by creating a report that uses it. Just build one in Report Builder and hit preview on the report itself.
Let me know if you still have problems with data sets.
- EJones8 years agoFrequent Visitor
Thanks, I see that it does correctly pass the parameter value through to the query now when creating a KPI.
Follow-up question: Is there a way to make KPIs refresh automatically when someone visits the report server page and have it refresh based off of the username of whoever is visiting? The values of my KPIs are shown based on the username of the person who created them, but if I log in as a different user, I still see those same values even though I need it to update based on the current user.
- krisztb8 years agoPower BI Team
There is a way to have the KPI get latest data using cache refresh plan for the underlying data set: https://community.powerbi.com/t5/forums/replypage/board-id/ReportServer/message-id/5062
Note that the refresh is time based, you can make the cache expire every minute, but if you want to trigger a refresh each time a user visits the server, you'll need to create a custom solution (e.g. schedule a refresh job using SQL Agent).