QlikView。 条件付き書式「Excelのように」

タスクは、「Excelのように」テーブルの条件付き書式設定を行うことです。 QlikViewは条件による色付けの標準タスクに十分に対応できますが、パラメーターを動的に選択することで、Excelの場合と同様に、「まったくそのようになりますか?」という疑問が生じました。

結論:いくつかの実装オプション、いくつかのバージョンがあり、テストとデバッグにかなりの時間が費やされました。 完成した実装のリファクタリングが実行されました。 最終バージョンを提示し、お客様のニーズを満たし、テストと検証を行いました。



機能的タスク(ステートメント)



ディメンションと式が動的に選択される表があり、値自体を計算するための式は単純です:合計、平均、相対割合、絶対値など。



選択したパラメーターに応じて、ユーザーがテーブルを色付けできるようにする必要があります。 重要な紹介-1つの列は、異なるパラメーターに従って異なる色、つまりマルチカラーでペイントできる必要があります。 2番目の重要な点は、別の「相互接続されたパラメーター」に応じてフィールドを色付けできることです。たとえば、「市場の製品の平均価格」の値に応じて「購入金額」を色付けします。

以下は、実装の主要部分です。 メニューの非表示/閉じる、リストの作成などについては触れません。 詳細について質問がある場合は、さらにお伝えします。



最終結果、とげのある道:







ブロック1.機能メニューのデータの準備



コードは、ブロックNo. 3で説明されているメニューリストの基盤を準備します。
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([/],'');
      
      







また、数十個の変数を作成する必要がありました。







vColorFormatString-収集された文字列



vColorFormatString1 ... 10 - vColorFormatStringの文字列を絶対値の 10個のパラメーターに解析するように設計されています 。この制限は意図的に作成しました。私の意見では、これはもはや必要ではなく、一般にこの制限は純粋にイデオロギーであり、少し時間を費やすことでパラメーターの数を増やすことができます。



vColorFormatStringPerc1 ... 10 - vColorFormatStringの文字列を相対値(パーセント)の 10個のパラメーターに解析するように設計



vColorFormat1 ... 10-



ブロック2.機能メニューの開発1







予定:



  1. ユーザーが作成したパラメーターの現在のリストを表示します。
  2. 条件付き書式設定オプションを削除する機能
  3. 条件付き書式設定オプションを選択するためのメニューを呼び出します。


以下の2つの要素について説明します。



1つ目は、現在作成されているパラメーターの表示です。



この領域は、文字列の解析に基づいて現在作成されたパラメーターを表示するテキストオブジェクトです。 そして今、このアクション全体の最初のブリック:



テキスト表示式
 = 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) ) )& ')'
      
      







恐怖がありますよね?:)



今では、すべてのロジックがテキスト行に実装されていることが多くの人に明らかになったと思います。 行を集めました-行をソートしました!



文字列アセンブリの形式は



|| RWA%| RWA%| RGB(255,0,0)|平均以上| num(vColorFormatValue1 / 100、 '### 0,00')|空

|| CODE%| CODE%| RGB(255,0,0)|平均以下| num(vColorFormatValue1 / 100、 '### 0,00')|空

|| GCD%| GCD%| RGB(255,0,0)|平均以下| num(vColorFormatValue1 / 100、 '### 0,00')|空

|| RORWA%| RORWA%| RGB(255,0,0)|平均以下|ラウンド(数値(124.63)、0.0001)|空

|| EL%| EL%| RGB(255,255,0)|平均以上|ラウンド(数値(124.62)、0.0001)|空

|| EL%| EL%| RGB(0,176,80)|平均以下|ラウンド(数値(124.62)、0.0001)|空

|| OD%| OD%| RGB(0,112,192)|平均以下|ラウンド(数値(124.62)、0.0001)|空

||



行を解析しましょう



|| WhatColor | 価値 | カラー | 条件 | Value1 | Value2



サブフィールド部分のインデックス(TextBetween(vColorFormatString、 '||'、 '||'、1)、 '|'、4)-各パラメーターの式は '||'で強調表示されます 「||」、単一の「|」で区切られたプロパティ式 したがって、インデックス1と4は、パラメータの最初のブロックとそこから4番目の値を取得することを意味します。



「between」パラメーターの2つの値(Value1、Value2)。



さらに進めましょう...



パラメータの削除は、基本的に文字列の値の「リプレイ」です。



条件付き書式設定パラメーターを削除するためのコード
=Replace(vColorFormatString, '||' & TextBetween(vColorFormatString,'||','||',1),'')







ブロック3.機能メニューの開発2



写真1




Picture2




Picture3




パラメータを収集するためのメインメニュー。 繰り返しますが、リストの要素と、クロージャーを隠すためのロジックの説明については触れません。



私たちのラインの主なロジックは、このメニューでユーザーが促したすべてが「準備完了」ボタンに縫い付けられているすべてのコレクションです。



アクション「変数を設定」はvColorFormatString、コード:
 =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 )
      
      







ブロック5.テキストの解析



変数のコードはvColorFormatString1 ... 10。



10個の変数のそれぞれのキーポイントは、SubField SubField(TextBetween(vColorFormatString、 '||'、 '||'、 1 )-vColorFormatString 1 、インデックス1のインデックスを変更することです。



vColorFormatString 4の場合 -それぞれ

サブフィールド(TextBetween(vColorFormatString、 '||'、 '||'、 4



絶対値解析変数コード
 =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')
      
      







違いは、相対値の式を変数にステッチし、文字列の内容に応じてそれらを置き換えることです。 それは別の方法で動作しなかった、または常に安定して動作しなかった、曲がったとみなされました...一般的に、最初は絶対値と相対値が1つの解析変数にあり、面倒に面倒で、コードエラーや計算を検索して、書かれたものを解析することは事実上不可能でした したがって、分割することが決定されました-いくつかの変数では絶対的なパーシム、他の変数ではパーセントです。



ブロック6.テーブルに設定を追加する



最も重要なことは、今、私たちが配布したものに基づいてテーブルをペイントする必要があることです。テーブル内のすべてのフィールドのコードは、フィールドに名前を付けるための入力条件を除いて同じです。そのため、すべてを手動で、自動化なし、正確には15列目のどこかに自動化する必要がありましたそれは指の筋肉で生成され、筋肉の記憶が発達します。 次へ



たとえば、テーブルの「CRM ID」フィールドの場合、コードの形式は
 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), ))))))))))
      
      







たとえば、テーブルの「AMOUNT」フィールドの場合、コードの形式は
 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), ))))))))))
      
      







基本的には以上です。 各メニュー項目を説明すると、トレーニングマニュアルのような完全な本が手に入ります。 誰かが詳細に欠けていたらごめんなさい。



PS
これはもっとエレガントにできる可能性が高いと思いますが、すでにプロセスに入っているときは、チップだけが飛ぶでしょう。 メニューの実装の詳細をすべて説明したくはありませんでした。 概して、この記事は、それがどのように行われるかを示すことを目的としています。おそらく誰かを刺激し、実装のより急なアイデアが現れるでしょう。




All Articles