cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Zuhebsayed
Frequent Visitor

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

 

1 ACCEPTED SOLUTION
v-ljerr-msft
Microsoft
Microsoft

Hi @Zuhebsayed,

 

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. Smiley Happy

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

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

 

c3.PNG

 

Regards

View solution in original post

3 REPLIES 3
v-ljerr-msft
Microsoft
Microsoft

Hi @Zuhebsayed,

 

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. Smiley Happy

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

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

 

c3.PNG

 

Regards

View solution in original post

Working for me thanks... Smiley Happy

MFelix
Super User
Super User

Hi @Zuhebsayed,

 

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

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors