Discussion board where members can learn more about Qlik Sense App Development and Usage.
I have the following Group of csv tables loaded in my Qliksense:
As all of these tables have the same number of dimensions and the same Dimension names, they are automatically merged into 1 unique final table.
My question is : how can I add a new calculated Dimension that would be applied to this final table.
I would like to avoid inserting this script in the load script of every single monthly table, and just to write it once for all.
The best way is to define it in the script, but you should use a loop so you only have your dimension defined in one place:
For each vFile in FileList('C:\Path\Transactions*.csv') Load *, FileName() as FileName, <SomeFormula> as NewDimension From "$(vFile)" (...) ; Next vFile
But it is also possible to do it in a chart or in the Qlik Sense asset panel. Just start writing a formula with a leading equals sign.
See also Loops in the Script
Another way is to create the dimensions after the concatenated table is created, through
<Load all CSV files in order to get MyConcatenatedTable>, followed by
LEFT JOIN (MyConcatenatedTable)
MyFormula as NewDimension
Just be careful on performance, depending on the amount of records.
Thank you both for your answers.
Actually I just found an even simpler solution. I just kept the script of the loading of my first file, and I replaced the name "Transactions012015.csv" by "*.csv".
Then Qliksense loads automatically all the csv files of the folder and merges all the tables.