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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
bhavvibudagam
Creator II
Creator II

How to find the Blank Records

Hi,

In a ACCIDENT_CLASS FIELD I HAVE BLANK RECORDS

In the below expression to find the count of ID ON ACCIDENT_CLASS i have to give the condition as Non-Injury where field ACCIDENT_CLASS = O or U or Blank

how to give the condition at the place of Blank.

=Count({<ACCIDENT_CLASS={'O','U','Blank'},PRIVATE_PROPERTY={'0'}> ID)

Thanks,

1 Solution

Accepted Solutions
Kushal_Chawda

try this

LOAD *,

         if(len(trim(ACCIDENT_CLASS))=0 , 'Blank',ACCIDENT_CLASS) as ACCIDENT_CLASS_NEW

....

FROM table;

Now your expression will work

Count({<ACCIDENT_CLASS_NEW={'O','U','Blank'},PRIVATE_PROPERTY={'0'}>} ID)

View solution in original post

6 Replies
Kushal_Chawda

try this

LOAD *,

         if(len(trim(ACCIDENT_CLASS))=0 , 'Blank',ACCIDENT_CLASS) as ACCIDENT_CLASS_NEW

....

FROM table;

Now your expression will work

Count({<ACCIDENT_CLASS_NEW={'O','U','Blank'},PRIVATE_PROPERTY={'0'}>} ID)

MK_QSL
MVP
MVP

While loading data in script use below instead of ACCIDENT_CLASS.

If(Len(Trim(ACCIDENT_CLASS))=0 or IsNull(ACCIDENT_CLASS), 'Blank', ACCIDENT_CLASS) as ACCIDENT_CLASS,

Now use below expression

=Count({<ACCIDENT_CLASS={'O','U','Blank'},PRIVATE_PROPERTY={'0'}>} ID)

MK_QSL
MVP
MVP

Count({<ACCIDENT_CLASS_NEW={'O','U','Blank'},PRIVATE_PROPERTY={'0'}>} ID)

Not applicable

You can handle this at script level,



if(len(trim(ACCIDENT_CLASS))=0 or ACCIDENT_CLASS='', 'Blank',ACCIDENT_CLASS) as NEW_ACCIDENT_CLASS


Then the way u are handling expression will work.


Thanks


tamilarasu
Champion
Champion

Try this,

=Count({<ACCIDENT_CLASS={"=Len(Trim(ACCIDENT_CLASS))=0 or Match(ACCIDENT_CLASS, 'O', 'U')"},PRIVATE_PROPERTY={'0'}> ID)

bhavvibudagam
Creator II
Creator II
Author

Thanks Kushal Its working