Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
nickjose7
Creator
Creator

How would you Cross Table & Load Script this table?

its.anandrjs antoniotimanserj_shukush141087‌ @franky_h79

Hi Guys,

Looking for your help once again:

I want to load this table (excel attached) in QlikView:

ModelTypeAug-17Aug-17 ($)Sep-17Sep-17 ($)Oct-17Oct-17 ($)Nov-17Nov-17 ($)
ABC-1P582000000
ABC-1Q84111,2891502,6370000
ABC-1R2192,146696766967669676
ABC-1Delta(%)37.5444.2500
ABC-1ALPHA7,0511,47000
DPX-23P00000000
DPX-23Q3408000000000
DPX-23R36427364273642736427
DPX-23Delta(%)0000
DPX-23ALPHA0500000

Where:

Column [Aug-17] gives Sales Quantity and Column [Aug-17 ($)] gives Sales Value.  Both Columns have 5 types of values viz. P, Q, R, Delta(%) and ALPHA for a single Model.


Only third and fourth columns are to be considered as every month this table will be replaced with a new one where the latest data be supplied in column 3rd and 4th. e.g if currently we are considering [Aug-17] and [Aug-17 ($)], by next month these two columns will be replaced by [Sep-17] and [Sep-17 ($)]


Now I want to achieve the following:

(a) Make a Link Date from the third or fourth column which are [Aug-17] and [Aug-17 ($)] respectively. (Actual value of [Aug-17] on loading in QlikView shows 42948)

Another option: the sheet name of this excel also gives month name as: [Aug'17 end result]


(b) Calculate Model wise Sum of [Aug-17 ($)] where Type=ALPHA.


(c) Calculate Model wise Sum of [Aug-17] where Type=Q


(d) Calculate (b) / (c)


(e) Write a Load script by which each month when this file is replaced at source, the current data is kept in the data model and the latest gets appended. Not sure but may be I am looking for an Incremental Load Script.


Data Source is MS Excel as attached.


Desired Output:

result.png


Sample data revised to add values against all models. Desired Output Screenshot added. Message was edited by: Nick Jose

28 Replies
nickjose7
Creator
Creator
Author

You are right. I'm sorry for mentioning the wrong value. Thanks for pointing out.

Nick

nickjose7
Creator
Creator
Author

This is great. Only one step behind.

Thanks for the help!!

Nick

nickjose7
Creator
Creator
Author

Perfect Solution Antonio, like always. Thanks a lot.

Now the only thing is, I need to do this in the backend and create a field say 'Alpha Per Unit' which will give me values 8.38 and 14.7 against the models.

Purpose: this will be taken to Data Model.

Seeking your quick response.

Nick

nickjose7
Creator
Creator
Author

Hi Pradosh,

Can you do this on backend and create a field for (b/c)?

pradosh_thakur
Master II
Master II

working on that.

do you not need Types other than Alpha and Q?

Learning never stops.
nickjose7
Creator
Creator
Author

No, other types are not required. Even the 'Type' filter is not required. Only the field with values of b/c is required against models.

The final output should be this:

final.png

nickjose7
Creator
Creator
Author

final output required:

final.png

pradosh_thakur
Master II
Master II

done .

PFA. straight table_new is the table i am using.Everything shifted to script level.Still check once by changing the data and let me know if it is working.

edit : Updated  the app as you needed that list box too. check it out.

Capture.PNG

regards

Pradosh

Learning never stops.
pradosh_thakur
Master II
Master II

Check it out i have updated the app and put a screenshot too. let me know if that helps

Learning never stops.
nickjose7
Creator
Creator
Author

Excellent Solution Pradosh. Thank you so much for your help!!

Just one thing to check: How can we ensure that only the columns 'C' and 'D' are picked every month from the source meaning this month it is [Aug-17] and [Aug-17 ($)]; Next month there will be a new file and the Column 'C' and 'D' will have [Sep-17] and [Sep-17 ($)]. Rest columns are to be ignored.

I will be marking this as the correct answer!!

Thanks

Nick