I created a composite key with fields as Enterdate &'_'& Centernum as %key and then i drop the field EnterDate,
but i need to use the date field in the front end expression may i know how to fetch only date field from %key.
I tried this ...date(date#(left(%key,10),'MM/DD/YY')
Date(Date#(SubField (%key, '_', 1), 'MM/DD/YY'))
Assuming your Enterdate was in the format 'MM/DD/YY'
Since you are using Left(%Key), it seems that Enterdate might be MM/DD/YYYY. If that is true, you can try this:
Date(Date#(SubField (%key, '_', 1), 'MM/DD/YYYY'))
Hi, But my %key contains fields like this,because of that i didn't get the dates,any suggestions please
Try this in the script:
Date#(SubField(%key, '-', 1), 'MM/DD/YYYY') as Date
Try this as a dimension:
Date#(SubField(%key, '-', 1), 'MM/DD/YYYY')
While writing the expression i got nothing actually i am struck at the flower braces which i got error,can you guide me on that
You can not have expressions on the left side of your set analysis like how you are trying to do..
Please take the suggestion of Jonathan and keep your date filed(EnterDate? ) in your base data model so that you could easily filter the data in the front end.
It depends on how your Enterdate format...
Considering your Enterdate is having MM/DD/YY format, you need to use as below
In case the format is MM/DD/YYYY use below
Is your date 8 characters or 10? Match the date format with the number of characters you are trimming with left().
But if you need the date in the front end, why do you drop EnterDate?
Retrieving data ...