cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ktt777
Helper IV
Helper IV

Add multiple columns in power bi

when i load data into power bi, there are already 5 column named A,B,C,D,E.

What is the fast way to add multiple columns with names : F,G,H,K,L,M,N... with null value to the database.

I will change the value of the column later

 

thanks,

1 ACCEPTED SOLUTION
FarhanAhmed
Super User
Super User

Create a Table with 2 columns 

e.g.

-- ColumnName -----Value

Put the number of  Columnname in columnname field and keep values as null

FarhanAhmed_0-1655985330496.png

 

 

then go to advance editor 

Pivot this table

with "No Aggregate"

FarhanAhmed_1-1655985375059.png

 

you will get the result as single row with multiple column

FarhanAhmed_2-1655985390769.png

 

 

 

Now 2 ways

Go to DAX and create a cross join between 2 tables one is source other is new columntable

CROSSJOIN function (DAX) - DAX | Microsoft Docs

2nd 

Go to Power query and Add the column

in formula field put the name of table

Expand the table in and you will get multiple columns in quick way

 

Cross join - Power Query | Microsoft Docs

 







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




View solution in original post

1 REPLY 1
FarhanAhmed
Super User
Super User

Create a Table with 2 columns 

e.g.

-- ColumnName -----Value

Put the number of  Columnname in columnname field and keep values as null

FarhanAhmed_0-1655985330496.png

 

 

then go to advance editor 

Pivot this table

with "No Aggregate"

FarhanAhmed_1-1655985375059.png

 

you will get the result as single row with multiple column

FarhanAhmed_2-1655985390769.png

 

 

 

Now 2 ways

Go to DAX and create a cross join between 2 tables one is source other is new columntable

CROSSJOIN function (DAX) - DAX | Microsoft Docs

2nd 

Go to Power query and Add the column

in formula field put the name of table

Expand the table in and you will get multiple columns in quick way

 

Cross join - Power Query | Microsoft Docs

 







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors