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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Does not fall to next line

Hi All

I have one calculated dimension as below

If(SHEET_ID = 'A.7.z' and match(LINE_NUMBER, '13') and match(Lob_ID, '242') and match(SUB_ID, '5'), 'Non-CB&S Central/ GLM'),
If(SHEET_ID = 'A.7.z' and match(LINE_NUMBER, '13') and match(Lob_ID, '242'), 'All CB&S'

In first line it consider only SUB_ID = 5

In second line it should consider all SUB_ID, but it does not.

If I remove first line than I am getting right amount.  What to put in second line so it consider all SUB_ID?

Thanking you all


15 Replies
Anonymous
Not applicable
Author

Try to put in the second if statement

and SUB_ID like '*'

This could extract all SUB_ID.

Anonymous
Not applicable
Author

Hi Elena

Thanks for your your time, I did put as you said but still the same, no affect

Anonymous
Not applicable
Author

Hi Elena

Thanks for your your time, I did put as you said but still the same, no affect

Anonymous
Not applicable
Author

I made some tests with a text object: maybe is there a syntax problem? Try this:

If(SHEET_ID = 'A.7.z' and match(LINE_NUMBER, '13') and match(Lob_ID, '242') and match(SUB_ID, '5'), 'Non-CB&S Central/ GLM',
If(SHEET_ID = 'A.7.z' and match(LINE_NUMBER, '13') and match(Lob_ID, '242'), 'All CB&S'))


I eliminate a bracket after 'Non-CB&S Central/ GLM': it works in my example


Not applicable
Author

I believe you did not close your original if statement:

If(SHEET_ID = 'A.7.z' and match(LINE_NUMBER, '13') and match(Lob_ID, '242') and match(SUB_ID, '5'), 'Non-CB&S Central/ GLM'),
If(SHEET_ID = 'A.7.z' and match(LINE_NUMBER, '13') and match(Lob_ID, '242'), 'All CB&S'))

Anonymous
Not applicable
Author

For first line I am getting correct result set...let say 11

For second line I should get 23(all SUB_ID), but I am getting 12 only. This means top amount is deducted

Thanking you Elena

Anonymous
Not applicable
Author

Hi Jacob

Same problem there

For first line I am getting correct result set...let say 11

For second line I should get 23(all SUB_ID), but I am getting 12 only. This means top amount is deducted

Thanks for your time

Anonymous
Not applicable
Author

Try this in the expression:

=if(If(SHEET_ID = 'A.7.z' and match(LINE_NUMBER, '13') and match(Lob_ID, '242') and match(SUB_ID, '5'), 'Non-CB&S Central/GLM',

If(SHEET_ID = 'A.7.z' and match(LINE_NUMBER, '13') and match(Lob_ID, '242') , 'All CB&S'))='Non-CB&S Central/GLM',sum(amount),sum(TOTAL amount))

If it doesn't work again, can you attach your qvw?

Anonymous
Not applicable
Author

How do I attach QV file?