Previous amount of month is double value


I have to add column month to add data column, this is my variable :


and this is the error I got :


How to get rid of the duplicate value?

Note : Prev month is 2022/03 (March 2022) because previous AddMonths is AddMonths(-3)


you can append the random number after your column name it will make it unique.

I don’t get it, where do I append it? In the data column or which activity? Can you make it details? Thanks


"your column name"+new Random().Next(1,999).Tostring


But my case is a variable DateTime.Now


have a look on it


it will uniquely identified your column name.


It’s invalid since I am using CDate

Hi @Rhys18,

Do you want it to be added even if it is the same here? If so, you can use below, it will create unique for every second.

previous_moth=DateTime.Now.AddMonths(-1).ToString("yyyy/MM hhmmss")


No, I want it to be added for every month and year only (June, July, etc)

How come it is double value thou?

I couldn’t understand it.

I understand correctly that the error received here is located from the same column name. You want the same again, but do you want a double value next to it? So that’s why I thought that adding seconds instead of a double value wouldn’t matter.

No I dont need the double value actually… I need something unique because it’s

I tested it for you but the clock still comes.

If you are allowed to create a static excel template here, you can create your column-independent data and append it below. Since you don’t add headers, you don’t need columns.

To be honest I don’t know what to do… Maybe anyone can help with this kind of thing?