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
Hi,
I am quite new to Power BI.
I have a table (direct query) with 3 columns
Date - Male_KPI - Female_KPI
23/5/2019 - 8000 - 7000
22/5/2019 - 7000 - 8000
I need a new table with this structure
Date - Gender(M/F) - KPI
23/5/2019 - M- 8000
23/5/2019 - F - 7000
22/5/2019 - M- 7000
22/5/2019 - F - 8000
where the gender is M or F.
How to do that?
Roberto
if it wasn't Direct Query my guess would be to use unpivot in the Query Editor - but I guess it switches the table to Import mode, correct?
Otherwise I guess you can do it in DAX using UNION and SELECTCOLUMNS
https://dax.guide/union/
https://dax.guide/selectcolumns/
But I guess the most efficent performance wise would be creating the view in your database
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.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 5 | |
| 5 | |
| 4 |