tColorsFormatListSelection: LOAD * INLINE [%ColorDisplayNameFormat n n% n n% ]; tFilterTypeListSelection: LOAD * INLINE [%FilterDisplayNameType ]; tColorsTableList: LOAD*INLINE [%ColorDisplayName|%ColorRGBValue|%SortColorList -| RGB(192,0,0)|1 | RGB(255,0,0)|2 | RGB(255,192,0)|3 | RGB(255,255,0)|4 -| RGB(146,208,80)|5 | RGB(0,176,80)|6 -| RGB(0,176,240)|7 | RGB(0,112,192)|8 -| RGB(0,32,96)|9 | RGB(112,48,160)|10 ](delimiter is '|'); tColorFieldsListSelectionRelation: Load [ Qlik] AS %ColorFieldName, [/] AS %ExpressionType D:\QLIK\Data\Mapped_fields.xlsx (ooxml, embedded labels, table is [MetaField]) WHERE Match([/],'',''); tColorFieldsListSelectionClause: Load [ Qlik] AS %ColorFieldNameClause, [/] AS %ExpressionTypeClause FROM D:\QLIK\Data\Mapped_fields.xlsx (ooxml, embedded labels, table is [MetaField]) WHERE Match([/],'');
= SubField(TextBetween(vColorFormatString,'||','||',1),'|',1) & '' & If(SubField(TextBetween(vColorFormatString,'||','||',1),'|',1) = SubField(TextBetween(vColorFormatString,'||','||',1),'|',2),'', SubField(TextBetween(vColorFormatString,'||','||',1),'|',2)) & ' ('& SubField(TextBetween(vColorFormatString,'||','||',1),'|',4) & ' '& If( Index(SubField(TextBetween(vColorFormatString,'||','||',1),'|',2),'%')>0 OR Index(SubField(TextBetween(vColorFormatString,'||','||',1),'|',4),'%')>0, If(WildMatch( SubField(TextBetween(vColorFormatString,'||','||',1),'|',4),'**'),'', num($(=SubField(TextBetween(vColorFormatString,'||','||',1),'|',5)),'# ##0,00')) & ' % '& If(WildMatch( SubField(TextBetween(vColorFormatString,'||','||',1),'|',6),'*Empty*'),'', num($(=SubField(TextBetween(vColorFormatString,'||','||',1),'|',6)),'# ##0,00')&' %') , If(WildMatch( SubField(TextBetween(vColorFormatString,'||','||',1),'|',4),'**'),'', num($(=SubField(TextBetween(vColorFormatString,'||','||',1),'|',5)),'# ##0.0')) & ' '& If(WildMatch( SubField(TextBetween(vColorFormatString,'||','||',1),'|',6),'*Empty*'),SubField(%EdName,',',1), num($(=SubField(TextBetween(vColorFormatString,'||','||',1),'|',6)),'# ##0.0')& ' ' &SubField(%EdName,',',1) ) )& ')'
=Replace(vColorFormatString, '||' & TextBetween(vColorFormatString,'||','||',1),'')
=If( SubStringCount(vColorFormatString,'||')<11 AND ( (vColorParamByClause=0 AND ( (Len(GetFieldSelections(%ColorFieldName))>0 AND Len(GetFieldSelections(%ColorFieldNameClause))>0) AND (GetFieldSelections(%ColorFieldName) <> GetFieldSelections(%ColorFieldNameClause)) )) OR (vColorParamByClause=1 AND Len(GetFieldSelections(%ColorFieldNameClause))>0) ), If(vColorParamByClause=0, if(len(vColorFormatString)<1, '||' & Trim(GetFieldSelections(%ColorFieldName,'|',50)) &'|' & Trim(GetFieldSelections(%ColorFieldNameClause,'|',50)) &'|' & $(=only({<%ColorDisplayName={"$(=SubField(concat(%ColorDisplayName,',',%SortColorList),',',1))"}>}%ColorRGBValue)) &'|'& GetFieldSelections(%ColorDisplayNameFormat,'|',1) & '|'& vColorFormatValue1Transform & '|'& If(GetFieldSelections(%ColorDisplayNameFormat,1) ='', vColorFormatValue2Transform,'Empty') & '||', vColorFormatString & Trim(GetFieldSelections(%ColorFieldName,'|',50)) &'|' & Trim(GetFieldSelections(%ColorFieldNameClause,'|',50)) &'|' & $(=only({<%ColorDisplayName={"$(=SubField(concat(%ColorDisplayName,',',%SortColorList),',',1))"}>}%ColorRGBValue)) &'|'& GetFieldSelections(%ColorDisplayNameFormat,'|',1) & '|'& vColorFormatValue1Transform & '|'& If(GetFieldSelections(%ColorDisplayNameFormat,1) ='', vColorFormatValue2Transform,'Empty') &'||' ) , if(len(vColorFormatString)<1, '||' & Trim(GetFieldSelections(%ColorFieldNameClause,'|',50)) &'|' & Trim(GetFieldSelections(%ColorFieldNameClause,'|',50)) &'|' & $(=only({<%ColorDisplayName={"$(=SubField(concat(%ColorDisplayName,',',%SortColorList),',',1))"}>}%ColorRGBValue)) &'|'& GetFieldSelections(%ColorDisplayNameFormat,'|',1) & '|'& vColorFormatValue1Transform & '|'& If(GetFieldSelections(%ColorDisplayNameFormat,1) ='', vColorFormatValue2Transform,'Empty') & '||', vColorFormatString & Trim(GetFieldSelections(%ColorFieldNameClause,'|',50))&'|' & Trim(GetFieldSelections(%ColorFieldNameClause,'|',50)) &'|' & $(=only({<%ColorDisplayName={"$(=SubField(concat(%ColorDisplayName,',',%SortColorList),',',1))"}>}%ColorRGBValue)) &'|'& GetFieldSelections(%ColorDisplayNameFormat,'|',1) & '|'& vColorFormatValue1Transform & '|'& If(GetFieldSelections(%ColorDisplayNameFormat,1) ='', vColorFormatValue2Transform,'Empty') &'||' ) ), vColorFormatString )
=If(Len(SubField(TextBetween(vColorFormatString,'||','||',4),'|',4))>0, Pick(Match(SubField(TextBetween(vColorFormatString,'||','||',4),'|',4) ,'','','','',' n ',' n%',' n ',' n%',' ',' '), // 'round(sum(['& Trim(SubField(TextBetween(vColorFormatString,'||','||',4),'|',2)) &'])/$(=%Value),1)' & '>' & $(='SubField(TextBetween(vColorFormatString,'&chr(39)&'||'&chr(39)&','&chr(39)&'||'&chr(39)&',4),'&chr(39)&'|'&chr(39)&',5)'), // 'round(sum(['& Trim(SubField(TextBetween(vColorFormatString,'||','||',4),'|',2)) &'])/$(=%Value),1)' & '<' & $(='SubField(TextBetween(vColorFormatString,'&chr(39)&'||'&chr(39)&','&chr(39)&'||'&chr(39)&',4),'&chr(39)&'|'&chr(39)&',5)'), // 'round(sum(['& Trim(SubField(TextBetween(vColorFormatString,'||','||',4),'|',2)) &'])/$(=%Value),1)' & '>' & $(='SubField(TextBetween(vColorFormatString,'&chr(39)&'||'&chr(39)&','&chr(39)&'||'&chr(39)&',4),'&chr(39)&'|'&chr(39)&',5)') &' AND '& 'round(sum(['& Trim(SubField(TextBetween(vColorFormatString,'||','||',4),'|',2)) &'])/$(=%Value),1)' & '<' & $(='SubField(TextBetween(vColorFormatString,'&chr(39)&'||'&chr(39)&','&chr(39)&'||'&chr(39)&',4),'&chr(39)&'|'&chr(39)&',6)'), // 'round(sum(DISTINCT ['& Trim(SubField(TextBetween(vColorFormatString,'||','||',4),'|',2)) &'])/$(=%Value),1)' & '=' & $(='SubField(TextBetween(vColorFormatString,'&chr(39)&'||'&chr(39)&','&chr(39)&'||'&chr(39)&',4),'&chr(39)&'|'&chr(39)&',5)'), // n 'num(rank(if(round(sum(['& Trim(SubField(TextBetween(vColorFormatString,'||','||',4),'|',2)) &'])/$(=%Value),1)>0, sum(['& Trim(SubField(TextBetween(vColorFormatString,'||','||',4),'|',2)) &']))/$(=%Value),1))' & '<=' & $(='SubField(TextBetween(vColorFormatString,'&chr(39)&'||'&chr(39)&','&chr(39)&'||'&chr(39)&',4),'&chr(39)&'|'&chr(39)&',5)'), // n% '100-((sum(['& Trim(SubField(TextBetween(vColorFormatString,'||','||',4),'|',2)) &']) / SUM( TOTAL ['& Trim(SubField(TextBetween(vColorFormatString,'||','||',4),'|',2)) &']))*100) < ' & '100-' & $(='SubField(TextBetween(vColorFormatString,'&chr(39)&'||'&chr(39)&','&chr(39)&'||'&chr(39)&',4),'&chr(39)&'|'&chr(39)&',5)') , // n 'num(rank(if(round(sum(['& Trim(SubField(TextBetween(vColorFormatString,'||','||',4),'|',2)) &'])/$(=%Value),1)>0, -sum(['& Trim(SubField(TextBetween(vColorFormatString,'||','||',4),'|',2)) &']))/$(=%Value),1))' & '<=' & $(='SubField(TextBetween(vColorFormatString,'&chr(39)&'||'&chr(39)&','&chr(39)&'||'&chr(39)&',4),'&chr(39)&'|'&chr(39)&',5)'), // n% '((sum(['& Trim(SubField(TextBetween(vColorFormatString,'||','||',4),'|',2)) &']) / SUM( TOTAL ['& Trim(SubField(TextBetween(vColorFormatString,'||','||',4),'|',2)) &']))*100) < ' & $(='SubField(TextBetween(vColorFormatString,'&chr(39)&'||'&chr(39)&','&chr(39)&'||'&chr(39)&',4),'&chr(39)&'|'&chr(39)&',5)'), // 'sum(DISTINCT ['& Trim(SubField(TextBetween(vColorFormatString,'||','||',4),'|',2)) &'])>= Median(TOTAL <$(vGroupByList)> ['& Trim(SubField(TextBetween(vColorFormatString,'||','||',4),'|',2)) &'])', // 'sum(DISTINCT ['& Trim(SubField(TextBetween(vColorFormatString,'||','||',4),'|',2)) &'])<= Median(TOTAL <$(vGroupByList)> ['& Trim(SubField(TextBetween(vColorFormatString,'||','||',4),'|',2)) &'])' ),'0>1')
=If(Len(SubField(TextBetween(vColorFormatString,'||','||',2),'|',4))>0 AND $(='WildMatch('& chr(39) & SubField(TextBetween(vColorFormatString,'||','||',2),'|',2)&chr(39) & ',' &chr(39)&'EL %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &','& chr(39)&'RWA %'&chr(39) &','& chr(39)&'RWA%(RORWA)'&chr(39) &','& chr(39)&'RORWA%'&chr(39) &')')>0, Pick(Match(SubField(TextBetween(vColorFormatString,'||','||',2),'|',4) ,'','','','',' n ',' n%',' n ',' n%',' ',' '), // Pick($(='WildMatch('& chr(39) & SubField(TextBetween(vColorFormatString,'||','||',2),'|',2)&chr(39) & ',' &chr(39)&'EL %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &','& chr(39)&'RWA %'&chr(39) &','& chr(39)&'RWA%(RORWA)'&chr(39) &','& chr(39)&'RORWA%'&chr(39) &')'), '$(vELPercFormula)','$(vNODPercFormula)','$(vODPercFormula)','$(vKODPercFormula)','$(vRWAPercFormula)','$(vRWAPercRORWAFormula)','$(vRORWAPercFormula)') & '>' & $(='SubField(TextBetween(vColorFormatString,'&chr(39)&'||'&chr(39)&','&chr(39)&'||'&chr(39)&',2),'&chr(39)&'|'&chr(39)&',5)'), // Pick($(='WildMatch('& chr(39) & SubField(TextBetween(vColorFormatString,'||','||',2),'|',2)&chr(39) & ',' &chr(39)&'EL %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &','& chr(39)&'RWA %'&chr(39) &','& chr(39)&'RWA%(RORWA)'&chr(39) &','& chr(39)&'RORWA%'&chr(39) &')'), '$(vELPercFormula)','$(vNODPercFormula)','$(vODPercFormula)','$(vKODPercFormula)','$(vRWAPercFormula)','$(vRWAPercRORWAFormula)','$(vRORWAPercFormula)') & '<' & $(='SubField(TextBetween(vColorFormatString,'&chr(39)&'||'&chr(39)&','&chr(39)&'||'&chr(39)&',2),'&chr(39)&'|'&chr(39)&',5)'), // Pick($(='WildMatch('& chr(39) & SubField(TextBetween(vColorFormatString,'||','||',2),'|',2)&chr(39) & ',' &chr(39)&'EL %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &','& chr(39)&'RWA %'&chr(39) &','& chr(39)&'RWA%(RORWA)'&chr(39) &','& chr(39)&'RORWA%'&chr(39) &')'), '$(vELPercFormula)','$(vNODPercFormula)','$(vODPercFormula)','$(vKODPercFormula)','$(vRWAPercFormula)','$(vRWAPercRORWAFormula)','$(vRORWAPercFormula)') & '>' & $(='SubField(TextBetween(vColorFormatString,'&chr(39)&'||'&chr(39)&','&chr(39)&'||'&chr(39)&',2),'&chr(39)&'|'&chr(39)&',5)') &' AND '& Pick($(='WildMatch('& chr(39) & SubField(TextBetween(vColorFormatString,'||','||',2),'|',2)&chr(39) & ',' &chr(39)&'EL %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &','& chr(39)&'RWA %'&chr(39) &','& chr(39)&'RWA%(RORWA)'&chr(39) &','& chr(39)&'RORWA%'&chr(39) &')'), '$(vELPercFormula)','$(vNODPercFormula)','$(vODPercFormula)','$(vKODPercFormula)','$(vRWAPercFormula)','$(vRWAPercRORWAFormula)','$(vRORWAPercFormula)') & '<' & $(='SubField(TextBetween(vColorFormatString,'&chr(39)&'||'&chr(39)&','&chr(39)&'||'&chr(39)&',2),'&chr(39)&'|'&chr(39)&',6)'), // Pick($(='WildMatch('& chr(39) & SubField(TextBetween(vColorFormatString,'||','||',2),'|',2)&chr(39) & ',' &chr(39)&'EL %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &','& chr(39)&'RWA %'&chr(39) &','& chr(39)&'RWA%(RORWA)'&chr(39) &','& chr(39)&'RORWA%'&chr(39) &')'), '$(vELPercFormula)','$(vNODPercFormula)','$(vODPercFormula)','$(vKODPercFormula)','$(vRWAPercFormula)','$(vRWAPercRORWAFormula)','$(vRORWAPercFormula)') & '=' & $(='SubField(TextBetween(vColorFormatString,'&chr(39)&'||'&chr(39)&','&chr(39)&'||'&chr(39)&',2),'&chr(39)&'|'&chr(39)&',5)'), // n Pick($(='WildMatch('& chr(39) & SubField(TextBetween(vColorFormatString,'||','||',2),'|',2)&chr(39) & ',' &chr(39)&'EL %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &','& chr(39)&'RWA %'&chr(39) &','& chr(39)&'RWA%(RORWA)'&chr(39) &','& chr(39)&'RORWA%'&chr(39) &')'), 'num(rank($(vELPercFormula),1))','num(rank($(vNODPercFormula),1))','num(rank($(vODPercFormula),1))','num(rank($(vKODPercFormula),1))','num(rank($(vRWAPercFormula),1))','num(rank($(vRWAPercRORWAFormula),1))','num(rank($(vRORWAPercFormula),1))') & '<=' & $(='SubField(TextBetween(vColorFormatString,'&chr(39)&'||'&chr(39)&','&chr(39)&'||'&chr(39)&',2),'&chr(39)&'|'&chr(39)&',5)'), // n% Pick($(='WildMatch('& chr(39) & SubField(TextBetween(vColorFormatString,'||','||',2),'|',2)&chr(39) & ',' &chr(39)&'EL %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &','& chr(39)&'RWA %'&chr(39) &','& chr(39)&'RWA%(RORWA)'&chr(39) &','& chr(39)&'RORWA%'&chr(39) &')'), '$(vELPercFormula)','$(vNODPercFormula)','$(vODPercFormula)','$(vKODPercFormula)','$(vRWAPercFormula)','$(vRWAPercRORWAFormula)','$(vRORWAPercFormula)') & ' < 100-' & $(='SubField(TextBetween(vColorFormatString,'&chr(39)&'||'&chr(39)&','&chr(39)&'||'&chr(39)&',2),'&chr(39)&'|'&chr(39)&',5)') , // n Pick($(='WildMatch('& chr(39) & SubField(TextBetween(vColorFormatString,'||','||',2),'|',2)&chr(39) & ',' &chr(39)&'EL %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &','& chr(39)&'RWA %'&chr(39) &','& chr(39)&'RWA%(RORWA)'&chr(39) &','& chr(39)&'RORWA%'&chr(39) &')'), 'num(rank(-$(vELPercFormula),1))','num(rank(-$(vNODPercFormula),1))','num(rank(-$(vODPercFormula),1))','num(rank(-$(vKODPercFormula),1))','num(rank(-$(vRWAPercFormula),1))','num(rank(-$(vRWAPercRORWAFormula),1))','num(rank(-$(vRORWAPercFormula),1))') & '<=' & $(='SubField(TextBetween(vColorFormatString,'&chr(39)&'||'&chr(39)&','&chr(39)&'||'&chr(39)&',2),'&chr(39)&'|'&chr(39)&',5)'), // n% Pick($(='WildMatch('& chr(39) & SubField(TextBetween(vColorFormatString,'||','||',2),'|',2)&chr(39) & ',' &chr(39)&'EL %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &','& chr(39)&'RWA %'&chr(39) &','& chr(39)&'RWA%(RORWA)'&chr(39) &','& chr(39)&'RORWA%'&chr(39) &')'), '$(vELPercFormula)','$(vNODPercFormula)','$(vODPercFormula)','$(vKODPercFormula)','$(vRWAPercFormula)','$(vRWAPercRORWAFormula)','$(vRORWAPercFormula)') & ' < ' & $(='SubField(TextBetween(vColorFormatString,'&chr(39)&'||'&chr(39)&','&chr(39)&'||'&chr(39)&',2),'&chr(39)&'|'&chr(39)&',5)'), // Pick($(='WildMatch('& chr(39) & SubField(TextBetween(vColorFormatString,'||','||',2),'|',2)&chr(39) & ',' &chr(39)&'EL %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &','& chr(39)&'RWA %'&chr(39) &','& chr(39)&'RWA%(RORWA)'&chr(39) &','& chr(39)&'RORWA%'&chr(39) &')'), 'round($(vELPercFormula),0.0001) > round($(vELPercTOTALFormula),0.0001)', 'round($(vNODPercFormula),0.0001) > round($(vNODPercTOTALFormula),0.0001)', 'round($(vODPercFormula),0.0001) > round($(vODPercTOTALFormula),0.0001)', 'round($(vKODPercFormula),0.0001) > round($(vKODPercTOTALFormula),0.0001)', 'round($(vRWAPercFormula),0.0001) > round($(vRWAPercTOTALFormula),0.0001)', 'round($(vRWAPercRORWAFormula),0.0001) > round($(vRWAPercRORWAFormulaTotal),0.0001)', 'round($(vRORWAPercFormula),0.0001) > round($(vRORWAPercTotalFormula),0.0001)'), // Pick($(='WildMatch('& chr(39) & SubField(TextBetween(vColorFormatString,'||','||',2),'|',2)&chr(39) & ',' &chr(39)&'EL %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &',' &chr(39)&' %'&chr(39) &','& chr(39)&'RWA %'&chr(39) &','& chr(39)&'RWA%(RORWA)'&chr(39) &','& chr(39)&'RORWA%'&chr(39) &')'), 'round($(vELPercFormula),0.0001) < round($(vELPercTOTALFormula),0.0001)', 'round($(vNODPercFormula),0.0001) < round($(vNODPercTOTALFormula),0.0001)', 'round($(vODPercFormula),0.0001) < round($(vODPercTOTALFormula),0.0001)', 'round($(vKODPercFormula),0.0001) < round($(vKODPercTOTALFormula),0.0001)', 'round($(vRWAPercFormula),0.0001) < round($(vRWAPercTOTALFormula),0.0001)', 'round($(vRWAPercRORWAFormula),0.0001) < round($(vRWAPercRORWAFormulaTotal),0.0001)', 'round($(vRORWAPercFormula),0.0001) < round($(vRORWAPercTotalFormula),0.0001)') ),'0>1')
if(Match('CRM ID',SubField(TextBetween(vColorFormatString,'||','||',1),'|',1)) AND ($(vColorFormatString1) OR $(vColorFormatStringPerc1)),$(vColorFormat1), If(Match('CRM ID',SubField(TextBetween(vColorFormatString,'||','||',2),'|',1)) AND ($(vColorFormatString2) OR $(vColorFormatStringPerc2)),$(vColorFormat2), If(Match('CRM ID',SubField(TextBetween(vColorFormatString,'||','||',3),'|',1)) AND ($(vColorFormatString3) OR $(vColorFormatStringPerc3)),$(vColorFormat3), If(Match('CRM ID',SubField(TextBetween(vColorFormatString,'||','||',4),'|',1)) AND ($(vColorFormatString4) OR $(vColorFormatStringPerc4)),$(vColorFormat4), If(Match('CRM ID',SubField(TextBetween(vColorFormatString,'||','||',5),'|',1)) AND ($(vColorFormatString5) OR $(vColorFormatStringPerc5)),$(vColorFormat5), If(Match('CRM ID',SubField(TextBetween(vColorFormatString,'||','||',6),'|',1)) AND ($(vColorFormatString6) OR $(vColorFormatStringPerc6)),$(vColorFormat6), If(Match('CRM ID',SubField(TextBetween(vColorFormatString,'||','||',7),'|',1)) AND ($(vColorFormatString7) OR $(vColorFormatStringPerc7)),$(vColorFormat7), If(Match('CRM ID',SubField(TextBetween(vColorFormatString,'||','||',8),'|',1)) AND ($(vColorFormatString8) OR $(vColorFormatStringPerc8)),$(vColorFormat8), If(Match('CRM ID',SubField(TextBetween(vColorFormatString,'||','||',9),'|',1)) AND ($(vColorFormatString9) OR $(vColorFormatStringPerc9)),$(vColorFormat9), If(Match('CRM ID',SubField(TextBetween(vColorFormatString,'||','||',10),'|',1)) AND ($(vColorFormatString10) OR $(vColorFormatStringPerc10)),$(vColorFormat10), ))))))))))
if(Match('AMOUNT',SubField(TextBetween(vColorFormatString,'||','||',1),'|',1)) AND ($(vColorFormatString1) OR $(vColorFormatStringPerc1)),$(vColorFormat1), If(Match('AMOUNT',SubField(TextBetween(vColorFormatString,'||','||',2),'|',1)) AND ($(vColorFormatString2) OR $(vColorFormatStringPerc2)),$(vColorFormat2), If(Match('AMOUNT',SubField(TextBetween(vColorFormatString,'||','||',3),'|',1)) AND ($(vColorFormatString3) OR $(vColorFormatStringPerc3)),$(vColorFormat3), If(Match('AMOUNT',SubField(TextBetween(vColorFormatString,'||','||',4),'|',1)) AND ($(vColorFormatString4) OR $(vColorFormatStringPerc4)),$(vColorFormat4), If(Match('AMOUNT',SubField(TextBetween(vColorFormatString,'||','||',5),'|',1)) AND ($(vColorFormatString5) OR $(vColorFormatStringPerc5)),$(vColorFormat5), If(Match('AMOUNT',SubField(TextBetween(vColorFormatString,'||','||',6),'|',1)) AND ($(vColorFormatString6) OR $(vColorFormatStringPerc6)),$(vColorFormat6), If(Match('AMOUNT',SubField(TextBetween(vColorFormatString,'||','||',7),'|',1)) AND ($(vColorFormatString7) OR $(vColorFormatStringPerc7)),$(vColorFormat7), If(Match('AMOUNT',SubField(TextBetween(vColorFormatString,'||','||',8),'|',1)) AND ($(vColorFormatString8) OR $(vColorFormatStringPerc8)),$(vColorFormat8), If(Match('AMOUNT',SubField(TextBetween(vColorFormatString,'||','||',9),'|',1)) AND ($(vColorFormatString9) OR $(vColorFormatStringPerc9)),$(vColorFormat9), If(Match('AMOUNT',SubField(TextBetween(vColorFormatString,'||','||',10),'|',1)) AND ($(vColorFormatString10) OR $(vColorFormatStringPerc10)),$(vColorFormat10), ))))))))))
Source: https://habr.com/ru/post/446076/
All Articles