Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have created an app using Qlik view and loaded two csv files into the data source. In the app i have created a pivot table which displays values of year as dimension and measures as sum(Quantity_Sold), Avg(Quantity_Sold). Similar fields loaded in different file but data is different.
Now, when i try to display data from first file then it displays as is. But my question is how to display second file data when it has similar field names Year as dimension and measures as sum(Quantity_Sold), Avg(Quantity_Sold).
Am able to see both the files in the data load editor but not able to display data from two different files.
Thanks in advance.
I would add flags from the two sources while loading the data. Something along these lines:
Table1:
LOAD Year,
Quantity_Sold,
1 as Flag
From Source1;
Concatenate (Table1)
LOAD Year,
Quantity_Sold,
2 as Flag
FROM Source2;
Now when you want to use both datasources use this expressions -> Sum(Quantity_Sold).
On the other hand if you just want to use source 1 -> Sum({<Flag = {1}>} Quantity_Sold)
source 2 -> Sum({<Flag = {2}>} Quantity_Sold)
If the source files have exactly the same fields then you'll end up in one table. You can add a field that stores from which source file the data came:
Data:
LOAD
*,
FileName() as Source,
FROM
*.csv (txt, ...etc)
;