Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
tringuyenminh92
Memorable Member
Memorable Member

Hi @Anonymous,

 

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

View solution in original post

5 REPLIES 5
tringuyenminh92
Memorable Member
Memorable Member

Hi @Anonymous,

 

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

Anonymous
Not applicable

 

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?

 

 

 

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?

Anonymous
Not applicable

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

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.