Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

Creating a new table with rows split by a new value

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

1 REPLY 1
Stachu
Community Champion
Community Champion

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



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.