View Qlik_Jira_Time_Formattings.qvs
// Format a time like in JIRA: 4w 3d 06:30 | |
// means: 4 weeks + 3 days (1 day = 8 hrs) + 6 hrs + 30 mins | |
If(Floor(Sum(AllIssues_fields_aggregatetimeoriginalestimate)/28800)/5 >= 1, | |
Num(Floor(Floor(Sum(AllIssues_fields_aggregatetimeoriginalestimate)/28800)/5), '#0') & 'w ', '') & | |
Num(Frac(Sum(AllIssues_fields_aggregatetimeoriginalestimate)/28800/5) * 5, '#0') & 'd ' & | |
Interval(Frac(Sum(AllIssues_fields_aggregatetimeoriginalestimate)/28800)/3, 'hh:mm') |
View QlikSenseClassicExtensionDebounceExample.js
define([ | |
"jquery", | |
"qlik", | |
"underscore" | |
], | |
function ($, qlik, _) { | |
'use strict'; | |
return { | |
initialProperties: {}, |
View KeepFields.qvs
Sub KeepFields(Fields,TableName) | |
Let n = NoOfFields('$(TableName)'); | |
Set d = #; | |
For i = 1 to $(n) | |
Let f = FieldName($(i), '$(TableName)'); | |
If Index('$(Fields)', ',$(f),') = 0 then | |
If '$(d)' = '#' then | |
Let d = '$(f)'; | |
Else | |
Let d = '$(d),$(f)'; |
View QlikView_WeekName_to_Date.qvs
// Convert weekname (eg. format YYYY/WW) to date: | |
=MakeWeekDate(subfield(field, '/', 1), subfield(field, '/', 2), 0) |
View QlikView_Data_Sampling.qvs
// 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.. |
View QlikView_more_than_14_digits.qvs
LOAD Div(Field, 1e10) & left(repeat('0',10), 10 - len(text(Mod(Field, 1e10)))) & Mod(Field, 1e10) as MyNum |
View QlikView_Wrap_Conditional_View_Expression.qvs
// 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) |
View QlikView_Load_broken_CSV.qvs
/* 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; |
View QlikView_Read_SheetIDs.qvs
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]); |
View QlikView_Patch_ARGB_to_RGB.qvs
// patch ARGB() to RGB(): | |
=replace( ColorMix1( ... ) , 'ARGB(255,', 'RGB(' ) |