Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can you please help to me to write the below if condition inside the set analysis please
Set Analysis Expression =
Count({< STATUS ={'Rejected'}, TYPE ={'RTP'}>} Items)
IF Condition:
=if( Switcher = Payer, Switcher ,null()).
on above if Condition all are column names
Basically I want to show this on the KPI in Qlik Sense.
I appreciate if you could help me to resolve the issue.
You can't write IF inside of set analysis, only outside:
If(Switcher=Payer, Count({<STATUS ={'Rejected'}, TYPE ={'RTP'}>} Items))
Are you using IndirectPayer as a dimension in your KPI? Or are you limiting the Items that get counted?
This is just a KPI numbers on the dashboard there no Dimension.
*Just limiting the items to get counted
Please correct my set analysis part with if condition
Count({< '*IF condition here' , STATUS ={'Rejected'}, TYPE ={'RTP'}>} Items)
=if( Switcher = Payer, Switcher )
Field names:
Switcher = Santander, Barclays, City, Lloyds, HSBC...etc
Payer = HSBC, Habib, Natwest, City, TSB, Santander.... etc,
You can't write IF inside of set analysis, only outside:
If(Switcher=Payer, Count({<STATUS ={'Rejected'}, TYPE ={'RTP'}>} Items))
No, you have to put all set analysis statements between { }. Are you getting Items where Switcher and Payer are Null? I would expect the If statement to remove them, because Qlik doesn't consider Null a value, so when Switcher and Payer are Null, they are not equal. They are nothing.
Still, you can make sure to get only values using a wildcard, like this:
Count({<STATUS ={'Rejected'}, TYPE ={'RTP'}, Switcher={'*'}>} If(Switcher=Payer, Items))
Or do it in the If, but they say performance is better with set analysis.
Count({<STATUS ={'Rejected'}, TYPE ={'RTP'}>} If(Switcher=Payer and Len(Switcher)>0, Items))