Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Extract date in the table

Hi All,

 

I want to extract date in the table. I have Month and number between 1 to 31, it there any function that help me extract date for the month. I don't want to use concatenate function as data type for concatenate is text format.

 

Month             Attribute         Date

 8/01/2017       1                  08/01/2017

 8/01/2017       2                  08/02/2017

 8/01/2017       3                  08/03/2017

6/01/2017        10                 06/10/2017

 

Thanks,

Zuheb

 

  • Hi Anonymous,

     

    Based on my test, you should be able to simply use the formula below to add a calculate column to your table to extract data for the month in this scenario. :smileyhappy:

    Date = Table1[Month] + Table1[Attribute] - 1

    Note: just replace 'Table1' with your real table name.

     

     

    Regards

3 Replies

  • Hi Anonymous,

     

    Try the DATEADD function using the LEFT/RIGHT you can get the information from other columns to add the year/month/day.

     

    Regards,

    MFelix

  • v-ljerr-msft's avatar
    v-ljerr-msft
    Microsoft Employee

    Hi Anonymous,

     

    Based on my test, you should be able to simply use the formula below to add a calculate column to your table to extract data for the month in this scenario. :smileyhappy:

    Date = Table1[Month] + Table1[Attribute] - 1

    Note: just replace 'Table1' with your real table name.

     

     

    Regards

    • Anonymous's avatar
      Anonymous
      Not applicable

      Working for me thanks... :smileyhappy: