Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Use these variables to help create a flexible report object.
// Self Service Report Helper
SET vActivateReportMeasure = If(Index(Concat(MeasureFieldName,';'),SubField(concat(MeasureFieldName,';'),';',$1)) AND GetSelectedCount(MeasureLabel),1,0);
SET vMeasureFieldName      = SubField(concat(MeasureFieldName,';'),';',$1);
SET vMeasureLabel          = Only({<MeasureFieldName={"~(=SubField(concat(MeasureFieldName,';'),';',$1))"}>} MeasureLabel);
LET vMeasureLabel          = Replace(vMeasureLabel,'~','$');  //I wish QlikView had an escape character!
//usage:
//$(vActivateReportMeasure(1))
//=$(vMeasureLabel(1))
//$(=$(vMeasureFieldName(1)))
SET vActivateReportDim     = If(Index(Concat(ReportFieldName,';'),SubField(concat(ReportFieldName,';'),';',$1)) AND GetSelectedCount(ReportLabel),1,0);
SET vReportFieldName       = '['&SubField(concat(ReportFieldName,';'),';',$1)&']';
SET vReportLabel           = Only({<ReportFieldName={"~(=SubField(concat(ReportFieldName,';'),';',$1))"}>} ReportLabel);
LET vReportLabel           = Replace(vReportLabel,'~','$');  //I wish QlikView had an escape character!
//usage:
//=$(=$(vReportFieldName(1)))
//$(vActivateReportDim(1))
//=$(vReportLabel(1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.