I have table like this:
Then I want to change the table to this:
I usually doing this in Power BI Query Editor but the file is too big so I try in another platform like Bigquery/Postgresql
Thank you
I have table like this:
Then I want to change the table to this:
I usually doing this in Power BI Query Editor but the file is too big so I try in another platform like Bigquery/Postgresql
Thank you
2
Answers
You can cross join to a a values clause:
Consider below solution (for BigQuery)
If applied to sample data in your question – output is
And also, slightly modified version of above where you can define Store Names explicitly if for some reason RegEx way does not work for you
Obviously, with same output