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: 
Anonymous
Not applicable

Dimension not displaying

if(hold_1 = '043' or hold_2 = '043' or hold_3 = '043' or hold_4 = '043' or hold_5 = '043' or other= '043', 'ment', If(cd = 'DD' or cd = 'SV', 'Core', 'Cert'))

If this is the if-statement I am using, how do I get the dimension 'ment' to appear even when it doesn't satisfy the if-statement... I would like 'ment' to be displayed with all zeroes if it does not satisfy the if-statement

Is there any way this is possible?

18 Replies
awhitfield
Partner - Champion
Partner - Champion

Doesn't your expression mean

if(hold_1 = '043' or hold_2 = '043' or hold_3 = '043' or hold_4 = '043' or hold_5 = '043' or other= '043',  IF TRUE then display 'ment',

IF False use If(cd = 'DD' or cd = 'SV', 'Core', 'Cert'))

If you wanted it to display 'ment' or '0000', should it not be something like

if(hold_1 = '043' or hold_2 = '043' or hold_3 = '043' or hold_4 = '043' or hold_5 = '043' or other= '043', 'ment', '0000')

Also if ment is a dimension there should NOT be single quotes around it

Andy

Anonymous
Not applicable
Author

Creating the dimension worked to have all the titles displayed. Now do I create a new expression with that reference to the dimension in it?

Anonymous
Not applicable
Author

the if statement I sent is a dimension, not expression. And no it does not mean that because I want all three displayed... 'Ment' Cert and 'Core'

Anonymous
Not applicable
Author

I think this could also be on the right track but the comma before '0000' is an error in the expreession

alexandros17
Partner - Champion III
Partner - Champion III

You're right I hadn't seen the else condition in the second if, the problem is: when the if condition is not satisfied?

You have ment, core or cert as result, which condition should return 0 ?

Anonymous
Not applicable
Author


The problem is in the first if-statement. If the hold or other variable are not met, 'ment' does not display in the dimension at all. I would like it to display no matter what even if the fields are all filled with 0's.

eg.

Cert           786     126

Core          200       45

ment              0         0

where as currently it does not have 'ment' as a row at all

stigchel
Partner - Master
Partner - Master

A new expression or adjusting your existing to do the correct calculation for each of the values in the valuelist like mentioned in my post

Anonymous
Not applicable
Author

So I have 9 expressions..... what do I do to them to make it work for the synthetic dimension?

Anonymous
Not applicable
Author

I realized I do not have the one record meeting the condition for 'ment'.... which is why I need a synthetic row for those who do not meet the condition.