Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
Why does this not work:
if(
count(EXECUTION_PLANNING_NAME1)>0 and IsNull(EXECUTION_PLANNING_NAME2),
EXECUTION_PLANNING_NAME2,EXECUTION_PLANNING_NAME3
)
while this works:
if(
count(EXECUTION_PLANNING_NAME1)>0 and IsNull(EXECUTION_PLANNING_NAME2),
1,0
)
PS:EXECUTION_PLANNING_NAME2 AND EXECUTION_PLANNING_NAME3 ARE ATTRIBUTES AND NOT TEXT.
Thank you
If this is a chart expression it probably does not work because the naked field references* have multiple possible values at each row. In this case QV does not know which value to use and returns null (like the Only() function).
You will need to rewrite the expression to avoid the naked fields.
* A field name not enclosed in an aggregation function (like Sum(), Max(), Avg())
Hi,
Can you tell us, your logic with simple words or with example, So that it will become easier to help you
Regards
Basically i have a tree (hierarchy) !
EXECUTION_PLANNING_NAME1 is the root and under it the nodes
EXECUTION_PLANNING_NAME2, EXECUTION_PLANNING_NAME3,EXECUTION_PLANNING_NAME4 .....
I want, when a level (example: EXECUTION_PLANNING_NAME1 ) has values, and the next level (EXECUTION_PLANNING_NAME2) does not have values, then i want the EXECUTION_PLANNING_NAME1 because ot would be the last node in the tree that has values(i.e: child node)
I want to list all the nodes (EXECUTION_PLANNING_NAME1 in our example) inside a list box
how do you suggest i rewrite the statement to be able to display EXECUTION_PLANNING_NAME1 or EXECUTION_PLANNING_NAME2 in the listbox?
Hi,
In that case you need little modification in your expression.
try below
if(
count(EXECUTION_PLANNING_NAME1)>0 and IsNull(EXECUTION_PLANNING_NAME2),
EXECUTION_PLANNING_NAME1,EXECUTION_PLANNING_NAME2
)
Regards
Dear Max,
The above still gives an error (it's not about which level im inserting). It's the fact that qlikview isnt displaying the values because of what i have read from other posts which is the naked field.