cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chronis69 Member
Member

problem with dates and evaluating a formula

hi

i have created a new column and Im doing some checks with date fields....

 

for some reason they don't seem to work. I'm tryind to identify records that were created either the 6th or 7th Dec 2016. the date format is european i.e. day/month/year

 

i have created the following but it doesnt work.

 

Column = if(or('opportunities'[Created].[Date]=6/12/2016 ;'opportunities'[Created].[Date]=7/12/2016);"found";"not found")

 

I suspect that time might have to do something with it but I can't tell which comes to my new problem. How can I evaluate the formula much like excel to see which part of the formula fails what is compared to what in order to debug it?

 

thanks

 

C
 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
tringuyenminh92 New Contributor
New Contributor

Re: problem with dates and evaluating a formula

Hi @chronis69,

 

Have you tried compare 'opportunities'[Created].[Date] with Date(Value(YearString),value(MonthString),value(DayString))

5 REPLIES 5
Highlighted
tringuyenminh92 New Contributor
New Contributor

Re: problem with dates and evaluating a formula

Hi @chronis69,

 

Have you tried compare 'opportunities'[Created].[Date] with Date(Value(YearString),value(MonthString),value(DayString))

chronis69 Member
Member

Re: problem with dates and evaluating a formula

 

hi @tringuyenminh92

 

yeap... that seemed to have worked...

 

Column = if(or('opportunities'[Created].[Date]=DATE(2016;12;6) ;'opportunities'[Created].[Date]=DATE(2016;12;7));"found";"not found")

 

funny though because when I compared with a dd/mm/year format,it didn't seem to complain..

 

is there a way that I can set by step calculate a formula like excel to see what the formula does?

 

 

 

tringuyenminh92 New Contributor
New Contributor

Re: problem with dates and evaluating a formula

I'm sorry but I don't know how excel behaves. Could you please show me some information or pictures with description for your expectation?

chronis69 Member
Member

Re: problem with dates and evaluating a formula

never though I'd hear that ;-) (don't know how excel behaves) but I'll give you an example.

 

dummy formula

 

=IF(5+7+9+12=2;"OK";"no OK"). then you select 'evaluate formula" and excel goes step by step evaluating the formula so that the user can "debug" it.

 

it is much like running a piece of programming code step by step and being able to see what the code does 

 

2016-12-08.png

tringuyenminh92 New Contributor
New Contributor

Re: problem with dates and evaluating a formula

As my perspective, i think no. maybe someone in this community that they could have solution for your concern.