6 Replies Latest reply on Jun 21, 2018 8:40 AM by Swathi Reddy

# How to create a duplicate row in tableau?

I have a report where I need to create duplicate row to be repeated with a different Goal value?

col1 Goal

A        4

B        5

C        6

D        7

Output

col1 Goal

A        4

B        5

B        10

C        6

D        7

Any help is appreciated.. thanks :-)

• ###### 1. Re: How to create a duplicate row in tableau?

Hi Swathi,

How are you calculating that B =10? Is that the sum of the previous 10 values?

Thanks,

Mavis

• ###### 2. Re: How to create a duplicate row in tableau?

hi Mavis,

I  took random numbers. The Goal numbers are  based off the calculated field

calc:

IF [col1]='A' then '4'

ELSEIF [col1]='B' then '5'

ELSEIF [col1]='C' then '6'

ELSEIF [col1]='D' then '7'

ELSE '0'

end

Now I want to insert a row(duplicate) with  col1=B and Goal=10 ? Can we do it?

Output

col1 Goal

A        4

B        5

B        10

C        6

D        7

Thanks

• ###### 3. Re: How to create a duplicate row in tableau?

Hi Swathi,

Here it is

You need to Self Union your Data to add a new Row.

These are the Calcs I used

Then Finally You can Create This view if you Need with B=15

Thanks

Deepak

If It Helps, Pl mark it Helpful and CORRECT to Close Thread

1 of 1 people found this helpful
• ###### 4. Re: How to create a duplicate row in tableau?

Hi Deepak,

Great! Thank you very much! Exactly what I was looking for..

One more thing,  say if B>7 and I want to flag that particular row.

How do I achieve that now as B is coming from 2 sheets..

• ###### 5. Re: How to create a duplicate row in tableau?

Hi Swathi,