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
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
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.

Top Solution Authors
Top Kudoed Authors