Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
venkatasuresh
Creator
Creator

Grouping dimension values

Hi Guys,

Need your help on below query.

One of my pivot table i have used dimension called 'Distributor'

under Distributor i want to display Others and null values '_' together 

EX:

DistributorQuantitysales
Amazon144000
flipkart122000
ebay83000
sanapdeal61200
Others183400
-276000

 

Expected output:

DistributorQuantitysales
Amazon144000
flipkart122000
ebay83000
sanapdeal61200
Others459400
   

 

i have added the calculation dimension like below

=if(Match([Distributor],'Amazon','flipkart','ebay','sanapdeal','Others'),[Distributor],'Others') 

but its not given expected out put 

 Thanks,

Suresh V.V

Labels (1)
1 Solution

Accepted Solutions
venkatasuresh
Creator
Creator
Author

Hi Thank you so much for your kind support:)

I fixed this issue by using apply-map  function

 

I tried both of your solutions its working fine on my local desktop,once i publish the application on access point 

i can see the null value '_'  , the i tried apply map the issue got fixed.

 

Thanks,

Suresh V.V

View solution in original post

3 Replies
Or
MVP
MVP

I would recommend doing this in the script, by setting up a new field, Distributor_Without_Nulls, which would have the formula:

if(isnull(Distributor),'Others',Distributor) as Distributor_Without_Nulls

If you don't want to do this script-side, you could also use this code in a calculated dimension, but in this case, users would not be able to click "Others" and get the correct selections applied, I think.

Saravanan_Desingh

One solution is.

=If(IsNull(Distributor) Or Distributor='Others', 'Others', Distributor)

Script:

tab1:
LOAD If(Distributor='',Null(),Distributor) As Distributor, Quantity, sales INLINE [
    Distributor, Quantity, sales
    Amazon, 14, 4000
    flipkart, 12, 2000
    ebay, 8, 3000
    sanapdeal, 6, 1200
    Others, 18, 3400
    , 27, 6000
];

commQV62.PNG

venkatasuresh
Creator
Creator
Author

Hi Thank you so much for your kind support:)

I fixed this issue by using apply-map  function

 

I tried both of your solutions its working fine on my local desktop,once i publish the application on access point 

i can see the null value '_'  , the i tried apply map the issue got fixed.

 

Thanks,

Suresh V.V