cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sebastienke
Helper II
Helper II

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 II
Super User II

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

 

 

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 II
Helper II

Thank you guys

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

HotChilli
Super User II
Super User II

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

 

 

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

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors