Forum Discussion

atin's avatar
atin
Icon for Advocate III rankAdvocate III
6 years ago
Solved

How to create Calculated Column to generate a First Date for each Month/Year

Hi Everyone - Please see below a snapshot of a Customer table - The first column is the Invoice Date while the 2nd column is what I want to create and unable to do so. The 2nd Column table is the First Date ( what I am looking to generate) 

 

For example , customers with invoices dated from 01 Jan to 31st Jan 2018 should have a First Date of 01 Jan 2018

Similary customers with invoices dated from 01 Feb to 28 Feb 2019 should have a FIRST DATE of 01 Feb 2018 etc 

 

Please can you tell me how to create a CALCULATED COLUMN for this. 

 

See data details:

 

 

 

Many thanks 

 

  • Hello atin 

    Give this a try.

    First Date = DATE ( YEAR ( [Invoice Date] ), MONTH ( [Invoice Date] ), 1 )

     

  • atin , Cuple of methods

    As a new column

    Start Date of month = eomonth([Invoice Date],-1)+1

     

    Start Date of month = date(year([Invoice Date]),month([Invoice Date]) ,1)

2 Replies

  • Hello atin 

    Give this a try.

    First Date = DATE ( YEAR ( [Invoice Date] ), MONTH ( [Invoice Date] ), 1 )

     

  • atin , Cuple of methods

    As a new column

    Start Date of month = eomonth([Invoice Date],-1)+1

     

    Start Date of month = date(year([Invoice Date]),month([Invoice Date]) ,1)