Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I am new to qlikview. I have two excel files containing sales of different dates ( week of 07/27 and week of 08/03). I want to create a table that display both sales.
Can anyone help me please ?
Thank you
you misunderstood . you mention weeks week of 07/27 and week of 08/03
i am assuming this will change dynamically . is that fair?
if so use a script something like below. (i am assuming you want to load last 2 weeks) i.e. Test 08-03-2020.xls and Test 07-27-2020.xlsx
let vLastWeek = Date(weekstart(today(),0,0)-7,'MM-DD-YYYY');
Sales:
LOAD ID,
Sales,
Date(weekstart(today(),0,0)-7,'MM-DD-YYYY') as Week
FROM
[..\Downloads\Test $(vLastWeek).xls]
(biff, embedded labels, table is Sheet1$);
let v2Week = Date(weekstart(today(),0,0)-14,'MM-DD-YYYY');
concatenate(Sales)
LOAD ID,
Sales,
Date(weekstart(today(),0,0)-14,'MM-DD-YYYY') as Week
FROM
[..\Downloads\Test $(v2Week).xls]
(biff, embedded labels, table is Sheet1$);
if you give me the sample excels i can tweak it to your specification
You can do that in a pivot table and move week to column.
you could do it script too but i would not recommend it as data model becomes less flexible.
Does the dates change?
Share the names of the files. sample of the contents.
Thank you for responding
Yes sales vary from one week to another. I want to put them in a table in order to see the difference.
you misunderstood . you mention weeks week of 07/27 and week of 08/03
i am assuming this will change dynamically . is that fair?
if so use a script something like below. (i am assuming you want to load last 2 weeks) i.e. Test 08-03-2020.xls and Test 07-27-2020.xlsx
let vLastWeek = Date(weekstart(today(),0,0)-7,'MM-DD-YYYY');
Sales:
LOAD ID,
Sales,
Date(weekstart(today(),0,0)-7,'MM-DD-YYYY') as Week
FROM
[..\Downloads\Test $(vLastWeek).xls]
(biff, embedded labels, table is Sheet1$);
let v2Week = Date(weekstart(today(),0,0)-14,'MM-DD-YYYY');
concatenate(Sales)
LOAD ID,
Sales,
Date(weekstart(today(),0,0)-14,'MM-DD-YYYY') as Week
FROM
[..\Downloads\Test $(v2Week).xls]
(biff, embedded labels, table is Sheet1$);
if you give me the sample excels i can tweak it to your specification
Thank you, this loaded sucessfully.
But could you tell me the expression that I have to write to display Sales of this week and sales of previous week ?
To be more simple, I want a table like this:
ID Sales(Week07/27) Sales(Week08/03)
* **** ****
'***' are numbers .
Thank you.
You can do that in a pivot table and move week to column.
you could do it script too but i would not recommend it as data model becomes less flexible.
Thank you a lot, I will try it