Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi, I'm asking for help creating a custom table which creates multiple rows out of each original row in my PowerBI dataset. Please excuse me if this has already been answered.
The scenario:
I imported an excel file into my project with this table (let's name it "Customers"):
Customer | BoughtInStore | BoughtOnline | BoughtByReferral |
Bob | Y | Y | |
Jane | Y | Y | Y |
Jenny | Y |
Without leaving PowerBI and creating external excel files, I want to create a new query or table (not a measure) in my project which looks like this:
Customer | Stage |
Bob | BoughtInStore |
Bob | BoughtOnline |
Jane | BoughtInStore |
Jane | BoughtOnline |
Jane | BoughtByReferral |
Jenny | BoughtInStore |
My new table will create a row for each customer and for each stage that they've been marked in the original Customers tables.
How can I acheve this?
Thank you in advance!
Solved! Go to Solution.
@Anonymous this can be easily achieved using the "Unpivot" transformation in Power Query.
After importing your table, select the "Customer" column, and from the Transform tab, select "Unpivot Columns" >> "Unpivot Other Columns".
Then, filter the "Value" column to keep only "Y", and finally, remove the Value column.
@Anonymous this can be easily achieved using the "Unpivot" transformation in Power Query.
After importing your table, select the "Customer" column, and from the Transform tab, select "Unpivot Columns" >> "Unpivot Other Columns".
Then, filter the "Value" column to keep only "Y", and finally, remove the Value column.
Amazing, this is exactly what I needed. Thank you very much!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
76 | |
63 | |
51 | |
48 |
User | Count |
---|---|
211 | |
86 | |
64 | |
59 | |
56 |