Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
Can some please explain the flow of the expression and Script part? Some one created one report with following expression and exp.name and Script part but I am bit confused on this as how its working and logic behind that.
Expression:
pick(match(%ComparisonTypeKey,1,2,3,4,5,6,7,8,9,10),
//1 Exposure Amount BS
sum({<PreviousDate=[Previous]::PreviousDate, Q0_B3STD_Exposure_Type ={'BS_AMT'}>}Q0_B3STD_Exposure_Amt),
//2 Exposure Amount EAD
sum({<PreviousDate=[Previous]::PreviousDate, Q0_B3STD_Exposure_Type ={'EAD'}>}Q0_B3STD_Exposure_Amt),
//3 Exposure Amount Credit Equivalent
sum({<PreviousDate=[Previous]::PreviousDate, Q0_B3STD_Exposure_Type ={'UNDRAWN_CE'}>}Q0_B3STD_Exposure_Amt),
//4 Exposure Amount Total
sum({<PreviousDate=[Previous]::PreviousDate >}Q0_B3STD_Exposure_Amt),
//5 Risk-weighted assets BS
sum({<PreviousDate=[Previous]::PreviousDate, Q0_B3STD_Exposure_Type ={'BS_AMT'}>}Q0_B3STD_RWA_AMT),
//6 Risk-weighted assets EAD
sum({<PreviousDate=[Previous]::PreviousDate, Q0_B3STD_Exposure_Type ={'EAD'}>}Q0_B3STD_RWA_AMT),
//7 Risk-weighted assets Credit Equivalent
sum({<PreviousDate=[Previous]::PreviousDate, Q0_B3STD_Exposure_Type ={'UNDRAWN_CE'}>}Q0_B3STD_RWA_AMT),
//8 Risk-weighted assets Total Credit,
sum({<PreviousDate=[Previous]::PreviousDate, Q0_B3STD_Exposure_Type ={'BS_AMT','EAD','UNDRAWN_CE'}>}Q0_B3STD_RWA_AMT),
//9 Risk-weighted assets MKT Risk,
sum({<PreviousDate=[Previous]::PreviousDate, Q0_B3STD_Exposure_Type ={'MARKET_RISK'}>}Q0_B3STD_RWA_AMT),
//10 Risk-weighted assets Total,
sum({<PreviousDate=[Previous]::PreviousDate>}Q0_B3STD_RWA_AMT))
Expression Name:='Previous Date: '&concat(distinct {<PreviousDate=[Previous]::PreviousDate>}PreviousDate,',')
Script Part:
ComparisonTypeTable:
LOAD * INLINE [
%ComparisonLinkTypeKey, %ComparisonTypeKey, ComparisonType, ComparisonSubType
1, 1, Exposure Amount, BS
1, 2, Exposure Amount, EAD
1, 3, Exposure Amount, Credit Equivalent
1, 4, Exposure Amount, EA Total
1, 5, Risk-weighted assets, BS
1, 6, Risk-weighted assets, EAD
1, 7, Risk-weighted assets, Credit Equivalent
1, 8, Risk-weighted assets, Total Credit
1, 9, Risk-weighted assets, MKT
1, 10, Risk-weighted assets, RWA Total,
1,11,,
];
Comment Table ComparisonTypeTable with "Table is used for the Monthly Comparative Mckup Report";
Join (TradeExposure)
Load Distinct
%ComparisonLinkTypeKey
Resident ComparisonTypeTable;
KPI name has been created inside the Script using INLINE Load and also according to the order %ComparisonTypeKey is also given to each KPI.
Now
pick(match(%ComparisonTypeKey,1,2,3,4,5,6,7,8,9,10),
sum({<PreviousDate=[Previous]::PreviousDate, Q0_B3STD_Exposure_Type ={'BS_AMT'}>}Q0_B3STD_Exposure_Amt),
......
First Part is
match(%ComparisonTypeKey,1,2,3,4,5,6,7,8,9,10)... This will try to match %ComparisonTypeKey Value with 1,2,3...
If It will be 1 then Pick will execute the first Expression
sum({<PreviousDate=[Previous]::PreviousDate, Q0_B3STD_Exposure_Type ={'BS_AMT'}>}Q0_B3STD_Exposure_Amt),
and so on...
KPI name has been created inside the Script using INLINE Load and also according to the order %ComparisonTypeKey is also given to each KPI.
Now
pick(match(%ComparisonTypeKey,1,2,3,4,5,6,7,8,9,10),
sum({<PreviousDate=[Previous]::PreviousDate, Q0_B3STD_Exposure_Type ={'BS_AMT'}>}Q0_B3STD_Exposure_Amt),
......
First Part is
match(%ComparisonTypeKey,1,2,3,4,5,6,7,8,9,10)... This will try to match %ComparisonTypeKey Value with 1,2,3...
If It will be 1 then Pick will execute the first Expression
sum({<PreviousDate=[Previous]::PreviousDate, Q0_B3STD_Exposure_Type ={'BS_AMT'}>}Q0_B3STD_Exposure_Amt),
and so on...
Hi Manish,
Then what it does - PreviousDate=[Previous]::PreviousDate.
I mean to say alternate state with ::
i think that means the selection is carried through the states. there is a good example in one of the default examples that come with Qlikview...What's New in Qlikview 11.qvw.
It you want to use filter other than in the particular alternate state , you need to use ::