Forum Discussion
Loop through table and use data from that table to create virtual tables
Hi all,
I am in search for a solution for a challenge I have and I hope someone can help.
I am in a transition of rebuilding a big Qlikview report to power bi and the following is coming up.
In QV 140 subtables are merged into 1 big table. with a lot of variables, different column fills and multiple calculations and filters.
What is equal are the number of columns, and their headers, so they can be merged using the QV variant of union.
My challenge is to avoid rebuilding 140 tables, in order to merge them. Which I think is highly inefficient.
For now I have a total table where almost all data which needs to be reported is in. but now comes the challenge:
- Next to that table I have a table with unique report nrs, various calculations and different column fills which can be different per report
- I want use the 2nd table to fill in the fields which can change from the total table
- I want to use virtual tables for this.
- And as last, I want to loop through the 2nd table, so per unique nr a report is created, and append with the data in the virtual table.
I am sure this can be done, but my knowledge is not that far I can carry it out without help.
Can someone point me into the right direction which & how to use the appropriate measures, parameters, variables data & formula groups ,and so on?
4 Replies
- lbendlinSuper User
What's the data source for these 140 subtables?
Byt the way, you are appending them, not merging them.
- PatrickBrom2702New Member
1 The data source is a table, build in SQL, and merged in Power BI with multiple other tables.
2 you are right, will amend acordingly
- lbendlinSuper User
Can you UNION these tables in SQL?
- PatrickBrom2702New Member
Nope, unfortunaltelly not