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

Date greater than condition

Hi All,

Please check whether the below condition is correct or not

If(Date(aggr(Max(S_Date) ,U_ID),'DD-MM-YYYY')>=Date('01-04-2016','DD-MM-YYYY'),'True','False')

If its greater than 01-04-2016 then True else False

Regards,

Keerthi KS

5 Replies
Anonymous
Not applicable
Author

Hi Keerthi,

It depends on where you use it, if you use it on a graph where the dimension is u_id, yes, it is almost correct. You don't need Aggr function.


If(Date(Max(S_Date),'DD-MM-YYYY')>=Date('01-04-2016','DD-MM-YYYY'),'True','False')


But, it is better that you attach your application to view and analyze it.


Regards!

Kushal_Chawda

use date# to interpret it as date and compare with Actual date field

If(Date(aggr(Max(S_Date) ,U_ID),'DD-MM-YYYY')>=Date#('01-04-2016','DD-MM-YYYY'),'True','False')

Chanty4u
MVP
MVP

try using

Date# function insted of Date

Not applicable
Author

I have used aggr(Max(S_Date) ,U_ID) as Calculated Dimension in my table. I want to display True if S_Date is greater than 01-04-2016 else False.

But when i use the condition Dimensions will be displayed twice.

sunny_talwar

Can you try this as your expression:

If(Max(S_Date) >= MakeDate(2016, 4, 1), 'True', 'False')