Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
rohitians
Creator III
Creator III

Pivot chart displaying of particular number of dimensions

Hello,

I have this pivot table where in i have Companies with their brand names ,I am diplaying sales of this brands CYvsLY..

Now the scene is i want to show only a particular number of brands i.e input box the user may select i want to see only top 3 brands of all companies

so as per the number only 3 top selling brands should be displayed for each company and total sales for that company should be dispayed...

I am attaching a sample qvw file in order to get an idea of the report...

and is it possible to achieve the same...

Thanks and Regards,

Rohit

1 Solution

Accepted Solutions
Not applicable

=if(aggr(rank(sum(CY)),$(=GetCurrentField(New)),BRAND)<=$(Top),BRAND)

View solution in original post

9 Replies
Not applicable

Please check the attached app and confirm whether it satisfies your requirement

rohitians
Creator III
Creator III
Author

Hello Vikram,

It's actually what i wanted...

But only one problem suppose i choose 10 it shows 10 brands and shows total of all the rest brands but with no label it shows - ..else everything is bang on..

Hope you are doing good..

Thanks and Regards,

Rohit

tresesco
MVP
MVP

Are you looking for this?

qv1.png

rohitians
Creator III
Creator III
Author

No tresesco,

Go through app posted by Mr Vikram you would to kno what I am asking...

Thanks and Regards,

Rohit

rohitians
Creator III
Creator III
Author

Hey Jatin

When I want to use a cyclical group instead of a single field company and the following is the code,

=if(aggr (rank (SUM({$<FinancialYear=,Quarter=,MonthName=,FiscalYear={$(=max(FiscalYear))},

Date={">=$(=YearStart(max({$<FiscalYear={$(=max(FiscalYear))}>} Date),0,4))<=$(=max({$<FiscalYear={$(=max(FiscalYear))}>} Date))"}>}Values

/10000000)

),GetCurrentField(Co-Thr),BRAND)<=$(vTopBrands),BRAND)

Is this the right way,

Thanks and Regards,

Rohit

Not applicable

Hi Rohit ,

try something this

=if(GetCurrentField(New)='COMPANY',

if(aggr(rank(sum(CY)),COMPANY,BRAND)<=$(Top),BRAND)

,if(GetCurrentField(New)='BRAND',

if(aggr(rank(sum(CY)),BRAND,BRAND)<=$(Top),BRAND)))

New --- Name of Cyclic group dimesnion

Not applicable

TRY THIS,

=if(aggr(rank(sum(CY)),

$(=if(GetCurrentField("cc_grp") = 'COMPANY', 'COMPANY',

if(GetCurrentField("cc_grp") = 'COMPANY1', 'COMPANY1',

if(GetCurrentField("cc_grp") = 'COMPANY11', 'COMPANY11'

))))

,BRAND)<=$(Top),BRAND)

Not applicable

=if(aggr(rank(sum(CY)),$(=GetCurrentField(New)),BRAND)<=$(Top),BRAND)

rohitians
Creator III
Creator III
Author

Hello Vikram, Jatin

Thanks for helping

=if(aggr(rank(sum(CY)),$(=GetCurrentField(New)),BRAND)<=$(Top),BRAND)

this code is working...

Thanks and Regards,

Rohit