How to add data to particular column according to the month

how to add the data to the particular months
like april,may,june it should display q1
july aug sept should be displayed as q2
likewise how to do that
and in another column , it should filled with sep

@anjani_priya

For Each row In YourDataTable
Assign activity: monthValue = Date.Parse(row(“DateColumn”)).Month
Switch activity: monthValue
Case 4, 5, 6
Assign activity: row(“QuarterColumn”) = “Q1”
Case 7, 8, 9
Assign activity: row(“QuarterColumn”) = “Q2”
Case Else
Assign activity: row(“QuarterColumn”) = “Sep”
End Switch
Next

1 Like

Book1.xlsx (13.2 KB)
this is the file
the quarter column and ytd column should be print like this
can you send the sample code for this

BlankProcess2.zip (3.4 KB)

Hi @anjani_priya find this xaml for sample code.

Regards,
Gayathri M K

extra 2 columns are adding

ITs working fine for me


BlankProcess2.zip (3.6 KB)

Regards,
Gayathri MK

when I enter large data, the loop is not stopping.It is taking more time atleast half hour to run.
Is there any alternate?

@anjani_priya

refer this you will the expected output

Sequence7.xaml (12.8 KB)

If I what to write this data for other sheets also how to do that?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.