Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I'm trying to convert a solution previously using ASP.NET as report viewer, into using paginated reports in Power BI instead.
So far so good, Ive managed to convert many of my reports, since the data is provided using stored procedures on a SQL Server with simple inputs like dates and salesgroups.
However, some of the procedures delivers dynamically output, i.e. where sales are shown by seller as columns and products as rows. Then there will be different numbers and names of columns depending on which salesgroup being selected.
How do I map a datadset to a table or tablix when the columns are different depending on the input parameter?
Is there a way to count columns in the dataset and format the table that way? (Thats how I've done it in ASP.NET, the two first columns being fixed like salesdate and productname, the last total sales and those between sales by each seller)
Regards,
John Martin
Solved! Go to Solution.
@jmkvalsund wrote:
How do I map a datadset to a table or tablix when the columns are different depending on the input parameter?
You don't. Report Builder cannot handle queries with a variable amount of columns.
So instead of doing the pivot operation in your stored proc you should just return the unpivoted data and then put the column you want as columns on the columns axis of the tablix.
@jmkvalsund wrote:
How do I map a datadset to a table or tablix when the columns are different depending on the input parameter?
You don't. Report Builder cannot handle queries with a variable amount of columns.
So instead of doing the pivot operation in your stored proc you should just return the unpivoted data and then put the column you want as columns on the columns axis of the tablix.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |