Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Need coming month value

Dear All,

I have one query that is I want full quarter value when i select Q4 ...

PFA....

18 Replies
sunny_talwar

Have you used this Excel to create the ABC.qvd?

Anonymous
Not applicable
Author

yes....

sunny_talwar

I think you are skipping the Feb and Mar data in the process... can you share the script you use to create ABC.qvd?

Anonymous
Not applicable
Author

Actually Sunny I was wrong and I had gave you wrong file ...

Sorry for that ....

Please find the exact excel file and application.

I have converted the attached excel file into qvd and process it in live application .

Thanks

sunny_talwar

What is vMaxDate?

Fact_DivisionTarget:

LOAD SG_ID,

    date(DivTarDate,'DD/MM/YYYY') as DivTarDate,

    DivAnnualTgt,

    DivMonthlyTgt,

    finyr,

    year,

    flag

FROM

[test.xlsx]

(ooxml, embedded labels, table is Sheet1)

Where DivTarDate <= date('$(vMaxDate)','DD/MM/YYYY') ;

DROP TABLE Fact_DivisionTarget;

ABC:

LOAD

  AUTONUMBER([SG_ID] & ' _' & Date(floor(DivTarDate),'DD/MM/YYYY')) As %DIVTAR_KEY,

  DivTarDate,

  [SG_ID],

    DivAnnualTgt ,

    DivMonthlyTgt ,

    year(DivTarDate) as  Year ,

    month(DivTarDate) as Month ,    

    YearName(DivTarDate,0,4) AS FinancialYear,

    'Q' & alt(if(Month(DivTarDate)<4,4),if(Month(DivTarDate)<7,1),if(Month(DivTarDate)<10,2),3) AS Quarter

FROM

[Target.qvd]

(qvd);

Anonymous
Not applicable
Author

vMaxDate = 02/01/2017test.png

sunny_talwar

I am a little confused....

1) why do you load data from Excel and Target.qvd? Is one loading past data (Excel) and one loading future data (qvd)?

2) If what I wrote above is not true and the Excel loads the future data as well.... why are you restricting it to load only before today's data when you want to see Feb and Mar in your table??

Please enlighten me

Anonymous
Not applicable
Author

Hi Sunny,

I have load excel into my extractor to convert into qvd and the it load into main file.

I got target file form user so need to load all month target.

My requirement is if user select 2016-17 then he can see total target and quarter wise target

e.g

Total Target   Q1Tar Q2Tar Q3Tar Q4Tar

100               25       25        25      25

but i am getting

Total Target   Q1Tar Q2Tar Q3Tar Q4Tar

100               25       25        25      15

rest of 10 is sum of feb and march is not coming

thanks

sunny_talwar

Can you try to load this without the where statement?

Fact_DivisionTarget:

LOAD SG_ID,

    date(DivTarDate,'DD/MM/YYYY') as DivTarDate,

    DivAnnualTgt,

    DivMonthlyTgt,

    finyr,

    year,

    flag

FROM

[test.xlsx]

(ooxml, embedded labels, table is Sheet1);

Where DivTarDate <= date('$(vMaxDate)','DD/MM/YYYY') ;