Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
BootCam
Creator
Creator

Set Analysis - Exclude some values but keep nulls

Hi,

My set analysis is like this:

 

= Sum(

{<

Type -= {'ABC','XYZ','PQR'},

ACT_NM = ,

Date = ,

Month = {'$(vMaxMonth'}

>}

Amount)

 

Some Account has Null values (-) in Type field but they have the Amount values. When i use this set analysis i dont get the account amount value that has null(-) value in Type field.

How do i get the Amount value for the Null values in the straight chart?

Any help is highly appreciated.

Straight chart:

Account ID       Type             Amount

1001                      ABC              100

1002                     XYX                200

1003                    PQR               150

1004                      -                     180

 

Thanks,

BC

 

1 Solution

Accepted Solutions
asinha1991
Creator III
Creator III

These things  will work

 

1.Sum(

{<

 

ACT_NM = ,

Date = ,

Month = {'$(vMaxMonth'}

>}

Amount)-

Sum(

{<

Type = {'ABC','XYZ','PQR'},

ACT_NM = ,

Date = ,

Month = {'$(vMaxMonth'}

>}

Amount)

 

2.

 

Sum(

{<

Type =- {'ABC','XYZ','PQR'},

ACT_NM = ,

Date = ,

Month = {'$(vMaxMonth'}

>}

Amount)+

Sum(

{<

 

ACT_NM = ,

Date = ,

Month = {'$(vMaxMonth'}

>}

if(isnull(Type),Amount))

 

3. assign Nullasvalue in the script

View solution in original post

5 Replies
gf
Creator III
Creator III

Instead of SUM try COUNT and for ACT_NM = , Date = , try
ACT_NM = '', Date = '', or ACT_NM ={''} , Date ={''} ,...
asinha1991
Creator III
Creator III

These things  will work

 

1.Sum(

{<

 

ACT_NM = ,

Date = ,

Month = {'$(vMaxMonth'}

>}

Amount)-

Sum(

{<

Type = {'ABC','XYZ','PQR'},

ACT_NM = ,

Date = ,

Month = {'$(vMaxMonth'}

>}

Amount)

 

2.

 

Sum(

{<

Type =- {'ABC','XYZ','PQR'},

ACT_NM = ,

Date = ,

Month = {'$(vMaxMonth'}

>}

Amount)+

Sum(

{<

 

ACT_NM = ,

Date = ,

Month = {'$(vMaxMonth'}

>}

if(isnull(Type),Amount))

 

3. assign Nullasvalue in the script

arpitkharkia
Creator III
Creator III

1.Replace the null values with 'Null' text in the backend in the following way

if (isnull(Type), 'Null', Type) as Type

 

2.Include 'Null' in the set analysis

Hope this helps. Please post some sample data if this doesnt resolve the issue.

 

Regards,

Arpit

 

BootCam
Creator
Creator
Author

Hi Asinha1991 ,

Yes, your solution is giving me the correct numbers.

 

Thanks a lot.

BC

asinha1991
Creator III
Creator III

yw 🙂