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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

how to add multiple columns from multiple table with SELECTCOLUMNS?

So I am trying to add the following columns from the following tables to a new table called "updates":

 

Table: ComputerUpdate

Columns: ci_id, machineid, status, last status change

 

Table: Computer

Column: Operating System

 

Table: Update

Column: title

I was able to use this formula to add in one column:

 

updates = SELECTCOLUMN(ComputerUpdate,"ci_id",[ci_id])

 

I can't figure out how to use this to add more than one though. Any help would be appreciated 🙂

4 REPLIES 4
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

 

You can try using ADDCOLUMNS or RELATED function

 

https://dax.guide/addcolumns/

 

https://dax.guide/related/

 

Regards,

Harsh Nathani

lbendlin
Super User
Super User

once you added them what are you planning to do next?  Table variables are short lived, they only exist inside the measure they are created. 

 

What prevents you from letting the data model do the work?

Anonymous
Not applicable

Well I'm having some strange issues. Basically I have a measure formula that works but when I slice it, it adds things that aren't supposed to be there, I'm just experimenting to see if I bring everything into one table whether or not it will work.

I was able to come up with this so far:

 

UNION(SELECTCOLUMNS(ComputerUpdate,"ci_id",ComputerUpdate[ci_id]),SELECTCOLUMNS(ComputerUpdate,"machineid",ComputerUpdate[machineid]),SELECTCOLUMNS(Computer,"Operating System",Computer[Operating System]))

 

It works but everything is in one column instead of multiple. I know the UNION function is at fault but I don't know what else to use.

Yeah, UNION is not your friend here.

 

Are the tables related, or are they dangling around?  In the former case you can potentially use RELATED() references, in the latter LOOKUPVALUE()

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.