Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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,
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)
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)
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)
Count({<ACCIDENT_CLASS_NEW={'O','U','Blank'},PRIVATE_PROPERTY={'0'}>} ID)
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
Try this,
=Count({<ACCIDENT_CLASS={"=Len(Trim(ACCIDENT_CLASS))=0 or Match(ACCIDENT_CLASS, 'O', 'U')"},PRIVATE_PROPERTY={'0'}> ID)
Thanks Kushal Its working ![]()