Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

kothakas
New Contributor III

Remove Hyphen in Bar Chart for Null Values

Hi,

I have a bar chart which is supposed to show null values count as well and it gets displayed correctly. The problem is that the label for the null values is Hyphen "-".

How can I replace the hyphen with a custom text, say "Unassigned"?

Capture.PNG

Thanks,

Sandeep

17 Replies
MVP
MVP

Re: Remove Hyphen in Bar Chart for Null Values

May be like this

Dimension

If(Len(Trim(Sector)) = 0, 'Unassigned', Sector)

xufei123
Valued Contributor

Re: Remove Hyphen in Bar Chart for Null Values

Fix it in the script, otherwise you have to modify the dimension for each single object.

shraddha_g
Honored Contributor III

Re: Remove Hyphen in Bar Chart for Null Values

uncheck Show Null Values in Dimension Section

kothakas
New Contributor III

Re: Remove Hyphen in Bar Chart for Null Values

Hi Sunny,

I have tried it and it is not working. Below is a screenshot.

Capture.PNG

Thanks,

Sandeep

MVP
MVP

Re: Remove Hyphen in Bar Chart for Null Values

How about this

If(Sector = '-', 'Unassigned', Sector)

kothakas
New Contributor III

Re: Remove Hyphen in Bar Chart for Null Values

Hi Fei,

Can you share a link which explains how to do this in a script? I have just started off development on QlikSense and dont know too much about the various features.

Thanks,

Sandeep

kothakas
New Contributor III

Re: Remove Hyphen in Bar Chart for Null Values

Hi Shraddha,

We need the null values to be shows in the bar chart. So, this is not an option.

Thanks,

Sandeep

sbobbyraj
Contributor III

Re: Remove Hyphen in Bar Chart for Null Values

Hello,

Try this for your dimension:

If(isnull(Sector),'Unassigned', Sector)

kothakas
New Contributor III

Re: Remove Hyphen in Bar Chart for Null Values

That also does not work.