If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
Hi guys,
I have an if dimension expression that returns the values and null, how solve this?
expression like that:
if( fieldA = 1,
text(aggr(concat({<FieldC={*}>}distinct FieldB,','),FieldC),
FieldD)
The result in the table is the values and a null row.
Hi @Jsobrinho77,
You could try to add a condition in your expression that filters out the null values. For example:
if( fieldA = 1 and not isnull(FieldB),
text(aggr(concat({<FieldC={*}>}distinct FieldB,‘,’),FieldC),
FieldD)
This should remove the null row from your table.
Regards,
Benoit
I am not sure exactly what is the problem, can you explain a bit more?
See if it helps to add the nodistinct keyword within the aggr-function.
Please like and mark my answer as a solution, if it resolved your issue.
Hi @Jsobrinho77,
You could try to add a condition in your expression that filters out the null values. For example:
if( fieldA = 1 and not isnull(FieldB),
text(aggr(concat({<FieldC={*}>}distinct FieldB,‘,’),FieldC),
FieldD)
This should remove the null row from your table.
Regards,
Benoit
Perhaps as below with double quotes?
if( fieldA = 1,
text(aggr(concat({<FieldC={"*"}>}distinct FieldB,','),FieldC),
FieldD)