cancel
Showing results for
Did you mean:
Highlighted
MBOVEO Frequent Visitor

## Union and Row to generate a table with 2 columns

Hi all,

I have a first need to create a table as following:

_GrFon = UNION ( VALUES ( Orig_table[GF] ); ROW ( "GF"; "Others" ) )

Then a neww table

_Equip = UNION ( VALUES ( Orig_table[Eq] ); ROW ( "Eq"; "Others" ) )

No I need to create the above but only in one table: means one table with the 2 columns GF and Eq

I don't know how to do it using union and row 😞

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
tejaswidmello Established Member

## Re: Union and Row to generate a table with 2 columns

Hi @MBOVEO ,

are you adding the new row to your exisitng table? ->( Orig_table[GF] and  Orig_table[Eq]

if so , than it is not possible adding row to the exisiting table as per the post below, however there is an alternative provided in this post.

or you just need to create a new fresh tables?

if so than here are the steps:

1-Hit on Dax New table 2,. 1st table:

```GrFON =
ROW("GF","Other")```

3. 2nd Table:

`EQUIP = Row("EQ","Oth")`

4. Merging these two tables.

```GrFON = Union(EQUIP,
ROW("GF","Other"))```

Since now I am trying to merge EQUIP Table (2nd table) with GrFON (1st table), I get the output as :

oth is from 2nd table Or if you dont want to create a calculated table, then simply hit on Enter Data in your home page: Let me know if these works.

Thanks,

Tejaswi

3 REPLIES 3
tejaswidmello Established Member

## Re: Union and Row to generate a table with 2 columns

Hi @MBOVEO ,

If you have already cerated _GrFON and _Equip tables, than you can use Merge query feature in power Bi desktop.

https://community.powerbi.com/t5/Desktop/Joining-contents-of-two-tables-into-one-new-table/td-p/3977...

May be this post is useful.

Thanks,

Tejaswi

MBOVEO Frequent Visitor

## Re: Union and Row to generate a table with 2 columns

They are calculated tables, I can't use Merge query ...

😞

tejaswidmello Established Member

## Re: Union and Row to generate a table with 2 columns

Hi @MBOVEO ,

are you adding the new row to your exisitng table? ->( Orig_table[GF] and  Orig_table[Eq]

if so , than it is not possible adding row to the exisiting table as per the post below, however there is an alternative provided in this post.

or you just need to create a new fresh tables?

if so than here are the steps:

1-Hit on Dax New table 2,. 1st table:

```GrFON =
ROW("GF","Other")```

3. 2nd Table:

`EQUIP = Row("EQ","Oth")`

4. Merging these two tables.

```GrFON = Union(EQUIP,
ROW("GF","Other"))```

Since now I am trying to merge EQUIP Table (2nd table) with GrFON (1st table), I get the output as :

oth is from 2nd table Or if you dont want to create a calculated table, then simply hit on Enter Data in your home page: Let me know if these works.

Thanks,

Tejaswi

Announcements #### New Topics Started Badges Coming  