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: 
lalitkgehlot89
Creator II
Creator II

Need Logic help related to day wise target.

Hi,

I have the monthly sale target. but target is only against the month start date.

I want to show it  monthly, weekly and daily wise. In data INVENTLOCATIONID and TARGETDATE is my key fields.

Please find the attached data file and help me out.

Thanks

Lalit Kumar

5 Replies
effinty2112
Master
Master

Hi Lalit,

               A preceding load like below will add the fields you need to aggregate on Month, Week and Day.

Regards

Andrew

Data:

Load *,

Date(TARGETDATE) as Date,

Date(TARGETDATE,'MMM YYYY') as MthYr,

Date(TARGETDATE,'MMM') as Month,

Date(TARGETDATE,'YYYY') as Year,

WeekStart(TARGETDATE) as WeekBeginning;

LOAD AMOUNT,

     DATAAREAID,

     INVENTLOCATIONID,

     PARTITION,

     RECID,

     RECVERSION,

     TARGETDATE

FROM

target.xls

(biff, embedded labels, table is Sheet1$);

lalitkgehlot89
Creator II
Creator II
Author

Thanks Andrew,

Target should be divide day wise. logic:- (Monthly target)/No_of_Days_In_Month

sunny_talwar

How about dividing the target by Day(MonthEnd(TARGETDATE))

[Monthly Target]/Day(MonthEnd(TARGETDATE))

lalitkgehlot89
Creator II
Creator II
Author

But Sunny I want to show it on a single date selection.

sunny_talwar

Can you elaborate on the issue a little more? What is wrong when you use one of the suggested expressions or methods?