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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
anmsharma
Helper II
Helper II

Splitting a Table into two based on the value of a column

Hi Team,

 

I am learning the Power BI and Dax, posting here a very basic question.

 

I have a requirement where a table "CommCost" which contains the communication expense data for the "Drivers" and "Owners" based on their geography is stored.

 

In MS Power BI. I want to Split this table in to two i,e, "CommCost_Drivers" and "CommCost_Owners". Could anyone suggest a way to accomplish this task.

 

If the column "Drivers" have the data then it should go to "CommCost_Drivers" else "CommCost_Owners".

 

Many Thanks,

Anmol

1 ACCEPTED SOLUTION
v-huizhn-msft
Employee
Employee

Hi @anmsharma,

Please click "New Table" under Modeling on Home page, please see the screenshot below. 


1.PNG

Then type the following formulas to create two new table.

 

CommCost_Drivers=FILTER(CommCost,CommCost[Drivers]<>BLANK())
CommCost_Owners=FILTER(CommCost,CommCost[Drivers]=BLANK())


Please feel free to ask if you has other issue.

Thanks,
Angelia

View solution in original post

3 REPLIES 3
v-huizhn-msft
Employee
Employee

Hi @anmsharma,

Please click "New Table" under Modeling on Home page, please see the screenshot below. 


1.PNG

Then type the following formulas to create two new table.

 

CommCost_Drivers=FILTER(CommCost,CommCost[Drivers]<>BLANK())
CommCost_Owners=FILTER(CommCost,CommCost[Drivers]=BLANK())


Please feel free to ask if you has other issue.

Thanks,
Angelia

Hi @v-huizhn-msft,

 

One basic question, please don't think am dumb..

 

How to sort the table as per a column values in these 2 splitted tables.

 

Your help would be very much appreciated.

 

Thanks,

Anmol

Hi @v-huizhn-msft Angelia,

 

Thanks a lot for the assistance. This worked greatly for me and served the exact purpose.

 

Regards,

 

Anmol

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.