Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
nevilledhamsiri
Specialist
Specialist

Breaking in to different types based on certain criterions!

Hi Friends

Please help me to achieve following out put based on the attached data!

1st Issue

IF PREMIUM=PHYSICAL, IT SHOULD BE 'PHYSICAL REFUND'

IF PREMIUM=NON_PHYSICAL, IT SHOULD BE 'NON_PHYSICAL REFUND'

IF PREMIUM=PHYSICAL+NON_PHYSICAL, IT SHOULD BE 'PART REFUND'

All above fields are expressions & appreciate, if the above criterions are combined & apply it in the script so as to get the desired out put.

2 nd Issue

Also debtor field carries no DEBTORS code at some instance. (Please refer excel) in such instance, I need the ME_CODE to be appeared in the debtor field (Assume Debtor code should be the ME_CODE),

Please help me to achieve this

Regards

Neville

18 Replies
vishsaggi
Champion III
Champion III

Try this in your last expr:

= IF(Dimensionality() =0 OR Dimensionality() = 1, Num(Sum(PHYSICAL)/Sum(TOTAL PREMIUM), '#,##0%'),

  Num(Sum(PHYSICAL)/Sum(PREMIUM), '#,##0%'))

nevilledhamsiri
Specialist
Specialist
Author

Now the calculations as per individual cases are ok but sub total ratio looks wrong.

vishsaggi
Champion III
Champion III

Can you send me the screen shot where you are seeing this. I have below is this not what you are expecting?

Capture.PNG

nevilledhamsiri
Specialist
Specialist
Author

I have attache the qvd, since screen shot is not taken due to an error. Please see the issue for that. If I have done a error please send me the correct expression

vishsaggi
Champion III
Champion III

Which sheet and which table i have to look into? Can you provide an example branch value to select and your expected output based on that selection?

vishsaggi
Champion III
Champion III

Check this attached.

nevilledhamsiri
Specialist
Specialist
Author

Please see the table with below expression applied & individual cases produces correct % but sub total looks not ok. Please send me the expression copied in the reply itself since i use a personnel version of qlik view.

Sorry for the troubles made

= IF(Dimensionality() =0 OR Dimensionality() = 1, Num(Sum(PHYSICAL)/Sum(TOTAL PREMIUM), '#,##0%'),

  Num(Sum(PHYSICAL)/Sum(PREMIUM), '#,##0%'))

vishsaggi
Champion III
Champion III

= IF(Dimensionality() = 0 OR Dimensionality() = 1, Num(SUM(PHYSICAL)/SUM ( TOTAL PREMIUM), '#,#0.%'),

     Num(SUM(PHYSICAL)/SUM(PREMIUM), '#,#0.%'))

Above is what i have been using. Does this expr not working?

nevilledhamsiri
Specialist
Specialist
Author

Thanks  Vishwarath, Now it is working!

Neville