cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
drallam Helper II
Helper II

assigning dates based on cell values in a column

HI,

 

I'm wondering how to assign a date in a custom column based on data in another column. I'm new to BI and not able to find a solution.

 Here's the picture.  The data repeats on the first row of every data set.  How do i know to identify that break and assign the dates?

This could be very simple with IF statements but the trick is the format is set to text, so not sure how to proceed. Any ideas?

 

1212.png

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator v-qiuyu-msft
Moderator

Re: assigning dates based on cell values in a column

Hi @drallam,

 

You can open Query Editor, add a custom column like below. It will return errors if the value is not a valid date.

 

q4.PNG

 

Then you can use Replace errors feature to replace errors as null. Utilize Fill-> Down feature to fill null values. 

 

q6.PNGq5.PNGq7.PNG

 

Best Regards,
QiuyunYu

 

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Microsoft Phil_Seamark
Microsoft

Re: assigning dates based on cell values in a column

Hi @drallam

 

Any chance you can mock up an example of what you'd like the data in the new column to look like for this data?  Maybe use Excel to create an example and post the info,


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

drallam Helper II
Helper II

Re: assigning dates based on cell values in a column

6/12/20176/12/2017
6/12/2017124
6/12/2017437
6/12/2017443
6/12/2017306
6/12/2017338
6/12/2017354
6/12/2017143
6/12/2017418
6/12/2017399
6/12/2017465
6/12/2017238
6/13/20176/13/2017
6/13/2017299
6/13/2017399
6/13/2017100
6/13/2017492
6/13/2017498
6/14/20176/14/2017
6/14/2017232
6/14/2017416
6/14/2017180
6/14/2017307
6/14/2017378

  So the original data set is Column B. The intent is to create a custom column A and somehow apply a formula. First step is to referecne only the date cells and paste them in column A. Second Step is Goto>Special>BlankCells> then the cells get selected and then click uparrow and then ctrl+enter. It reference the above cell to the blank ones. How can we get this logic here.? 

Moderator v-qiuyu-msft
Moderator

Re: assigning dates based on cell values in a column

Hi @drallam,

 

You can open Query Editor, add a custom column like below. It will return errors if the value is not a valid date.

 

q4.PNG

 

Then you can use Replace errors feature to replace errors as null. Utilize Fill-> Down feature to fill null values. 

 

q6.PNGq5.PNGq7.PNG

 

Best Regards,
QiuyunYu

 

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors