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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Cayshin
Frequent Visitor

Dynamically splitting one Source Table into multiple separate query tables?

So I have a query table such as:

TitleColumn 1Column 2
Arandom datarandom data
Arandom datarandom data
Arandom datarandom data
Brandom datarandom data
Brandom datarandom data
Brandom datarandom data
Brandom datarandom data
Brandom datarandom data
Crandom datarandom data
Crandom datarandom data

 

Is there a method to automatically split this query into seperate queries for each unique Title?

So in the above example, I would end up with 3 query new tables: A table of just rows with a Title of "A", another table with just "B"s, and a third table with just "C"s.

In actual practice, there could be a dozen or more unique Titles.

 

The overall issue I have is that the random data in Column 1, 2, etc... is just that: random. It's a mix a true/false, interger, string text, dates with each data type determined by the Title (so "A"s might be true/false, "B"s might be string text, etc). The inconsistent data types obviously prevent using any functions that rely on it such as SUM() or Date Hierachy. Some of the seperated queries may require further customization so it'd be nice to have them already pulled out to modify.

 

Thanks in advance.

1 REPLY 1
ChenwuZhu_Gmail
Resolver I
Resolver I

Hi @Cayshin ,

 

Maybe you can try use Group by to group the original table.

ChenwuZhu_Gmail_0-1660202752683.png

 

Then create an invoke function via Blank Query to create a new table.

invoke function:

let
    Source =  (x as number) => 
    let 
    tbl = #"Table"{x}[_table]
    in 
    tbl
in
    Source

 

Then if you enter a number and invoke, it will create a new table.

ChenwuZhu_Gmail_1-1660202876311.png

ChenwuZhu_Gmail_2-1660202909480.png

 

Best regards.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.