Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Excluding dimensons that are not equal to null


I have a dimension where some of the records are null and some contain a 4 digit code. I only want to include the null records but when I try to create a calculated dimension I just get blank records in the value fields

I've attached my QVD and its the table that is showing trading partner is where I'm looking to only include the null value records

12 Replies

Re: Excluding dimensons that are not equal to null

May be try this:

=If(Len(Trim(Field)) = 0, 'Null') and check 'Suppress When Value Is Null' option on the Dimension tab of chart properties.

HTH

Best,

Sunny

Not applicable

Re: Excluding dimensons that are not equal to null

Thanks

But I'm trying to include the NULL values not exclude them

Re: Excluding dimensons that are not equal to null

That's what I am intending to do also. Give this a try and see if it gives you the result you are expecting.

lironbaram
Honored Contributor II

Re: Excluding dimensons that are not equal to null

hi

you can try the example in the attach model

Not applicable

Re: Excluding dimensons that are not equal to null

I added that to a calculated dimension and changed all the values to read Null but left the records there

Not applicable

Re: Excluding dimensons that are not equal to null

Sorry I can't see a model attached,am I missing something

lironbaram
Honored Contributor II

Re: Excluding dimensons that are not equal to null

i changed your calculated dimension to

=if(isnull(TradingPartner),'null') and checked the suppress null values

Gabriel
Valued Contributor II

Re: Excluding dimensons that are not equal to null

Hi,

Why not create a flag in the script with

IF(ISNULL(TradingPartner),1,0) AS Flag_TradingPartner

And in the dimension use this new fields as dimension with Set Analysis of where Flag_TradingPartner  ={1}


Not applicable

Re: Excluding dimensons that are not equal to null

Thanks

I get the first part and I can add that to my script, I'm not sure about the set analysis. Would I do this as a calculated dimension or include it in myu expressions

Community Browser