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

According to a certain value, in a custom column I want to bring a specific list

Hi everyone.


I have a column in Power Query with the "S", "N" and "T" variants. For each of these letters, I have three specific tables and I want to bring a specific column for each one of them. How can I do it?

 

What I know: if I were not to consider any of these variants, it would be enough to create a custom column whose formula would point to my table that I want to bring. Example: = [T_table]. But what about these three possibilities?

 

if [Unity] = "S" then [dPropertyUnits] else if [Unity] = "N" then [dUnitPartners] else null returns me error.

1 ACCEPTED SOLUTION

Hi @LeandroCampacci ,

You should quote the table column like this when you add a custom column:

= if [Unity] = "S" then #"Table 1"[Group] else if [Unity] = "T" then #"Table 2"[Data] else null

list.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
HotChilli
Super User
Super User

Are you saying you want to bring the whole column from another query and add it as a list to the row?

If so, you have to refer to it by QueryName [column]

At the moment the code is looking for a column called [dPropertyUnits] in the same table - so it won't find it

Yes, the entire column. But it must be selected according to a previous validation [if ...]

Hi @LeandroCampacci ,

You should quote the table column like this when you add a custom column:

= if [Unity] = "S" then #"Table 1"[Group] else if [Unity] = "T" then #"Table 2"[Data] else null

list.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

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