Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Category for BLANK FIELDS

Hi all,

I set up categories for Dispatcher in SAP - e.g. if DISPO.MARC = A06 it's category Purchasing.

the categorisation is based on an external Excel sheet:

if the field %Dispo is empty, the category "others" should be created. But this is not working at the Moment... I tried filling the empty field in Excel with 0/' '/" " etc. but nothing worked and materials with no Dispatcher (empty) field are not shown within the category "others".

I am glad for any Input 🙂

Thank you a lot!

Regards,

Barbara

7 Replies
sunny_talwar

What is the script you are using to check empty %DISPO? Is it Len(Trim(%DISPO)) > 0 or something else?

Not applicable
Author

The script is as followed:

DisponentCategories:
LOAD %DISPO as DISPO.MARC,
Category
FROM
[..\..\02 Extern\steuernde_Daten_PP\Lagerauslastung.xlsx]
(
ooxml, embedded labels, table is [Disponent Kategorien]);

Anonymous
Not applicable
Author

Hi Barbara,

Solution Script one way to check for nulls i mean empty values:

Resulttable:

Load

%DISPO,

if( len(%DISPO)=0,'others',Category) as Category

;


Load %DISPO,

Category

from table;



Solution Script second way to check for nulls:

Resulttable:

Load

%DISPO,

if( isnull(%DISPO),'others',Category) as Category

;


Load %DISPO,

Category

from table;

qlikviewwizard
Master II
Master II

what is your code?

Anonymous
Not applicable
Author

Let me know if either of the below script helps you

DisponentCategories:

Load

DISPO.MARC,

if( len(DISPO.MARC)=0,'others',Category) as Category

;



LOAD %DISPO as DISPO.MARC,
Category
FROM
[..\..\02 Extern\steuernde_Daten_PP\Lagerauslastung.xlsx]
(
ooxml, embedded labels, table is [Disponent Kategorien]);



///////////or ///////////////////////////////////


Load

DISPO.MARC,

if( isnull(DISPO.MARC),'others',Category) as Category

;



LOAD %DISPO as DISPO.MARC,
Category
FROM
[..\..\02 Extern\steuernde_Daten_PP\Lagerauslastung.xlsx]
(
ooxml, embedded labels, table is [Disponent Kategorien]);

Not applicable
Author

Hi!

unfortunately it didn't helps..
the second one creates a lot of syntetic keys - the first one didn't changes anything..

The whole script part is a followed:

first I am loading table MARC after that the Excel file with the mapping between Dispo.marc and category:

MARC:
left keep(MARA)
LOAD *
FROM $(Data)\MARC.QVD (qvd);


DisponentCategories:
LOAD %DISPO as DISPO.MARC,
Category
FROM
[..\..\02 Extern\steuernde_Daten_PP\Lagerauslastung.xlsx]
(
ooxml, embedded labels, table is [Disponent Kategorien]);

I am gladful about any other tipp :-)!

Not applicable
Author

its me again 🙂

the Syntax error was my mistake - but also the second script had no changes...

maybe one further screenshot from the datamodel - when I select category "others" the first line in the Dispo.Marc should be selected:

19-07-2016 16-09-00.jpg