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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
VegarOyfoss
Helper I
Helper I

Create new query/table based on content of a column - part 1 - import

Hi All

 

I am very new to PowerBI and I have found many answers to my questions searching this forum. Howerer, I could not find the answer for my current problem.

 

I have a table where one of the column specify a particular task (one our of four possibilities - Closed SCTasks, Closed Tickets, Touched Tickets and Effort Time). I would like to create 4 new tables based on the content of this coulmn called "Task". If it says Closed SCTasks, I want all of those rows copied into a new table/quiry where I only have Closed SCTasks/Effot Time and so on.

 

task.png

 

1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @VegarOyfoss 

If I understand correctly what you need, you can create 4 calculated tables by filtering the original. For instance for the rows where  Task is Closed SCTasks:

NewTable1 =
FILTER ( Table1, Table1[Task] = "Closed SCTasks" )

Follow the same pattern for the other 3 tables

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

View solution in original post

7 REPLIES 7
AlB
Super User
Super User

Hi @VegarOyfoss 

If I understand correctly what you need, you can create 4 calculated tables by filtering the original. For instance for the rows where  Task is Closed SCTasks:

NewTable1 =
FILTER ( Table1, Table1[Task] = "Closed SCTasks" )

Follow the same pattern for the other 3 tables

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

Hi @AlB

You solution does indeed create 4 new calulcated tables, however, it is not possible to further edit each calulated table deperately. I would like to rename the table for results to SCTasks, and remove the existing column called Tasks in this new table.

 

Maybe I need to play around with unpivoting the Tasks column in the original somehow.

 

I might be going about it in a more difficult way than I intend. I basically want to make new columns for Closed SCTasks, Closed Tickets, Effort Time and so on, with the corresponding result under them

@VegarOyfoss 

You can do that in the query editor. Create a table with the same source as the original one, filter for SCTask (or any of the other) and delete the Tasks column. 

@AlB 

Alright. But when I will add new data to the original file, will this be automatically copied to the new tables?

My bad, I should have mentioned that I intend to keep adding new data weekly into the original excel file from which the powerBI will estract the data

 

Yes. You just have to hit Refresh to get the new data in

 

 

 

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

@AlB 

Ahh, ok, I meant "after" clicking the refresh 🙂

I will give it a try now and report back

 

Thank you for your help so far

Hi @VegarOyfoss ,

 

If your issues have been solved, you could accept a satisfactory reply.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.