Last active
May 5, 2017 11:09
-
-
Save gsbeaton/6c6519c22896b702d59bc357a5e9438c to your computer and use it in GitHub Desktop.
Use these variables to help create a flexible report object.
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
// 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