This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set vDocument=C:\Projekte\QlikView\MeineApp.qvw; | |
Sheets: | |
LOAD '$(vDocument)' as DocumentName, | |
SubField(SheetId, '\', 2) as SheetID, | |
Title as SheetName | |
FROM [$(vDocument)] (XmlSimple, Table is [DocumentSummary/Sheet]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// patch ARGB() to RGB(): | |
=replace( ColorMix1( ... ) , 'ARGB(255,', 'RGB(' ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This expressions gives all non-selected values | |
=aggr(only({1-$} Field), Field) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// generic load with one consolidated resulting table: | |
InputTable: | |
LOAD * INLINE [ | |
object,attribute,value | |
ball,color,red | |
ball,diameter,10 cm | |
ball,weight,100 g | |
box,color,black | |
box,height,16 cm | |
box,length,20 cm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// unnest data of field value: | |
Input: | |
LOAD * INLINE [ | |
ACCOUNT, SUPPLIES | |
001, "Apples,Bananas,Tomatos" | |
002, "Bread,Butter,Cheese" | |
003, "Pretzel,Wuerstl" | |
]; | |
Result: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Companies: | |
LOAD * INLINE [ | |
Company | |
CompanyA | |
CompanyB | |
CompanyC | |
]; | |
List: | |
LOAD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Example file 'broken.txt' with a broken line, field containing CR/LF: | |
Field1|Fiel2|Field3 | |
Abcd|efg|hijk | |
Lm|no | |
pq|vwz | |
123|456|7890 | |
*/ | |
Set vDelimiter = '|'; | |
Set vNoOfColumns = 3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In this case it is helpful to wrap the expression to catch NULL and empty string: | |
// works for: | |
// =if(Null(), -1, 0) | |
// =if('', -1, 0) | |
=if(<expression>, -1, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOAD Div(Field, 1e10) & left(repeat('0',10), 10 - len(text(Mod(Field, 1e10)))) & Mod(Field, 1e10) as MyNum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in this case we want to load a 10% sampling set of the data | |
data: | |
LOAD ….<your fields>… | |
FROM <your QVD file> | |
WHERE ceil(rand() * 100) <= 10; // or: rand() <= 0.1 | |
// SAMPLE n LOAD is much faster but allocates the memory of the full data set during the LOAD | |
// Where rand() <= n allocates only the memory of the smaller result set which could be crucial with Big Data.. |