Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Lets say I have one table with
ID,
Date,
something else,
and another with
ID,
Tons,
something else(2),
How would i use the Date and Tons to calculate how many tons i have for a specific date
Hi,
Try like this.
DATA_EMP:
LOAD ID,
// date(DATE#(Date,'MM/DD/YYYY')) as Date,
Date,
S1,
S2
FROM
TEST_DATA.xlsx
(ooxml, embedded labels, table is Sheet1);
JOIN (DATA_EMP)
LOAD ID,
Tons,
S3,
S4
FROM
TEST_DATA.xlsx
(ooxml, embedded labels, table is Sheet2);
NoConcatenate
DATA:
LOAD *, if(Date=Today(),Tons) as Today_Tons;
LOAD * Resident DATA_EMP;
DROP TABLE DATA_EMP;
Qlikview should automatically join both the tables based on common field ID. Can you show your data model and expr your are trying?
They have the line in between them but I just want to know what an expression like that would look like?
I need to Sum all of the tons for dates that are today.
so like IF(date = Today(), Sum(tons_actual))
Ok. So is your Date field same format as Today() format? What is the issue you are facing. Any sample file to look into?
May be you can try like
= Sum(IF(Date = Today(), tons_actual)
=IF(Date(date_arrivee, 'dd/mm/yyyy') < Date(today(), 'dd/mm/yyyy'), Sum(tons_actual))
Hi,
Try like this.
DATA_EMP:
LOAD ID,
// date(DATE#(Date,'MM/DD/YYYY')) as Date,
Date,
S1,
S2
FROM
TEST_DATA.xlsx
(ooxml, embedded labels, table is Sheet1);
JOIN (DATA_EMP)
LOAD ID,
Tons,
S3,
S4
FROM
TEST_DATA.xlsx
(ooxml, embedded labels, table is Sheet2);
NoConcatenate
DATA:
LOAD *, if(Date=Today(),Tons) as Today_Tons;
LOAD * Resident DATA_EMP;
DROP TABLE DATA_EMP;