Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
krishna20
Specialist II
Specialist II

Date format

Hi Friends,

I'm having problem in date format.

=sum({$<TP_MONTH={$(=MAX(TP_MONTH)))-12)},TP_YEAR=,TP_MONTH=>}TP_GROSS)

I'm having in datamodelling TP_MONTH as JAN,FEB,MARCH,APR.....

How can i take in set analysis as 1,2,3..........

Can any one pls provide sample one..

Regards

Krishna

31 Replies
Not applicable

Hi,

No I used dates but I think you get the result you want.

Use the expression I gave you in a straight table with Year and month dimensions. then you can add your expression and compare the results.

cheers,

David

krishna20
Specialist II
Specialist II
Author

Hi David,

Thank you for ur expression,i got nearest value.But i need to compare the with the month.can you pls suggest me where i can include this month expression in the above expression.

Regards

krishna

Not applicable

you need to modify the script for that,

I suggest you to add a field monthstart using TP_APPR_DT field

You can add this to your script:

New_Policy_Calendar:

load *,

monthstart(TP_APPR_DT) as New_month

resident Policy_Calendar;

drop table Policy_Calendar;

then you can use the expression I gave you or something similar,

Cheers,

David

krishna20
Specialist II
Specialist II
Author

Hi david,

i did wat u suggested me..But the result is same before creating the calender table.

Regards

krishna

Not applicable

can you attach your new model?

krishna20
Specialist II
Specialist II
Author

Hi David,

Pls find the above attachment. and guide me further.

Regards

Krishna

Not applicable

Sorry I don't see the new month field, but anyway, can you tell me why my formula is not ok?

krishna20
Specialist II
Specialist II
Author

Hi David,

actually i need to get the result for 2013 for july 22.i need to compare month also here(LYTD).

Regards

Krishna

krishna20
Specialist II
Specialist II
Author

Hi David,

Here is file updated file with a field TP_NEW_MONTH.

Pls find it and guide me.

krishna20
Specialist II
Specialist II
Author

Hi David ,

The file is not opening can you please upload once again.

Regards

krishna