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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
sebastienke
Helper III
Helper III

How to create a 1 one column query based on another query without duplicate the query ?

Hi, 

 

I have a long query (#1) resulting in a multi column table.

I would like for different reasons to create a new query (#4) wich is the copy of column A of query #1 and to keep query #1 in my datamodel (so i dont want to delete others columns to get my 1 column query).

 

But all the solutions I have found (for example : right click on the column and choose "add as new query") results to execute a 2nd time the query #1 and to keep the column A as final step. But this also results to double the time needed to load my data model.

 

Is there anyway to copy paste my column A directly in a new query ?

 

 

To be more specific, I have 3 FACT tables that are 3 different queries but in all of them, I have a common column (column A).

In order to create a DIM query (#4) with masterdata, I want to get first all the distinct values of column A of query #1 #2 and #3.

Why I want to do that? because I just want to download from a SAAS cube the values corresponding to my columns A and not the 100000000000 values that are in it.

 

Thank you for your help 🙂

2 ACCEPTED SOLUTIONS
HotChilli
Super User
Super User

Make a new blank Query.

Paste this (with your table name) in the advanced editor:

let
    Source = #"TableX"[col1]
in
    Source

 That will give a list (which you can convert to table from the interface)

View solution in original post

Anonymous
Not applicable

 

 

let
    Source = #"TableX"[[col1]]
in
    Source

 

 

 

using the double [[    and     ]] you get a column-table directly.

But I don't think this solves the problem of performance

 

Qualche miglioramento si può ottenere usando Table.Buffer  to wrapp the column-table

View solution in original post

3 REPLIES 3
sebastienke
Helper III
Helper III

Thank you guys

I have also discovered the "reference" function which works also. 

HotChilli
Super User
Super User

Make a new blank Query.

Paste this (with your table name) in the advanced editor:

let
    Source = #"TableX"[col1]
in
    Source

 That will give a list (which you can convert to table from the interface)

Anonymous
Not applicable

 

 

let
    Source = #"TableX"[[col1]]
in
    Source

 

 

 

using the double [[    and     ]] you get a column-table directly.

But I don't think this solves the problem of performance

 

Qualche miglioramento si può ottenere usando Table.Buffer  to wrapp the column-table

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors