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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
kabibi15
Contributor III
Contributor III

Removing Spaces where there is no Data

Hello Everyone,

 

Is there any syntax in Qlik Sense that will removed spaces like this. I appreciate your help.Data_Spaces.JPG

11 Replies
melissapluke
Partner - Creator
Partner - Creator

Do you want them to be null or the lines not to be loaded?

kabibi15
Contributor III
Contributor III
Author

I want the lines not to be loaded.

Stoyan_Terziev
Partner - Creator III
Partner - Creator III

Hi Kabibi15,

 

There isn't enough information in the picture, but I suppose you somehow scraped the titles off the columns.

Are those Dimension values or Measure values?

 

If they are dimension, you can find the desired dimension(s) in the dimension pane of your chart and uncheck "Include null values.".

 

If they are measure values - there isn't anything you can do since there is just not cross-reference value between the two dimensions you are combining. Probably you can just fix your back-end data to populate 0 value for what would be the intersection between those dimension values.

 

I hope this helps!

 

Kind regards,

S.T.

 

 

 

kabibi15
Contributor III
Contributor III
Author

They're all dimensions. When I uncheck "Include null values.". the total amount does not match up.

melissapluke
Partner - Creator
Partner - Creator

Not loaded in the script or in your visualization?

melissapluke
Partner - Creator
Partner - Creator

Do you want spaces to be turned into nulls? If so, you can do something like this in your script.

Any ' ' in your A field will now be replaced with a null.

LOAD
if(A=' ',null(),A) as A,
"B",
C
FROM [lib://downloads/test.xlsx]
(ooxml, no labels, table is Sheet1);

kabibi15
Contributor III
Contributor III
Author

I'm not sure if that will solve the problem. I just don't want blank spaces and the amount should match the source excel data. Thanks.

melissapluke
Partner - Creator
Partner - Creator

If there are other fields/columns in your excel sheet that should be loaded along with that line, my suggestion should work. Do that  for each field that has spaces and you should be ok.

kabibi15
Contributor III
Contributor III
Author

What if I don't want the field to be 'null'?