Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Top 3 Plan Names by Rank (Stright Table)

Hi Folks, I want to show Top 3 Plans on each column like Top Plan 1, Top Plan 2 & Top Plan 3 in a straight Table.

I am using below expressions to calculate the Top 3 Plans in the straight table:

Top Plan 1: CONCAT(IF(Aggr(Rank(Sum(TQTY)),PlanName)=1,PlanName))

Top Plan 2: CONCAT(IF(Aggr(Rank(Sum(TQTY)),PlanName)=2,PlanName))

Top Plan 3: CONCAT(IF(Aggr(Rank(Sum(TQTY)),PlanName)=3,PlanName))

But the above expressions are not working properly? Is it possible can we do on the calculated dimension ?

Please find the attached files for reference.

8 Replies
Not applicable
Author

Any one help me on this .....

Not applicable
Author

Help Needed!...

Not applicable
Author

hi,

    Check this attach file and let me know.

Regards,

Ashutosh

Not applicable
Author

I want show Top Plan1, Top Plan2 , Top Paln3 as Columns in the table like below. The values should be changes based on the other selection like product id's:

TerrNoProfessional IDTop Plan1Top Plan2Top Plan3
139079HNQYQC CGUROH DCQNHVBWYMZVWPCH ARDUU ZGUSV SFUML
439079HNQYQC CGUROH DCQNHVBWYMZVWPCH ARDUU ZGUSV SFUML
jerem1234
Specialist II
Specialist II

I am not sure what it means for Plan Names to be the same, yet have different PlanId's. So I did the aggr's by PlanId instead of PlanName. But the table matches what u have for ID 39079.

PFA

Hope this helps!

Not applicable
Author

Why the Rank() function is not working ?

Can we get this on calculated dimension ?

jerem1234
Specialist II
Specialist II

Attached is the way to do it with rank, you needed to aggregate on TerrNo and Professional_Id as well (I also did PlanId instead of PlanName). Also, I switched the mode of rank for the second parameter to 4 to handle the ties (instead of it showing null).

As for calculated dimensions, you cannot use the function concat since it is an aggregation function. Here is a snippet from Qlikview Help:

Add calculated dimension...

Adds a new dimension and opens it for editing in the Edit Expression Dialog dialog. A chart dimension is often in a single field, but can also be dynamically calculated. A calculated dimension consists of an expression involving one or more fields. All standard functions may be used. Aggregation functions may not be used, but the Advanced Aggregation function can be included for achieving nested aggregation.

So if you wanted to do it that route, you would have to do it through another way, maybe script?

Hope this helps!

jerem1234
Specialist II
Specialist II

Do you need Top Plan 1, Top Plan 2, and Top Plan 3, all in one table? If you are in need of using calculated dimensions, you can separate out and use different tables for the 3.

Just strip concat and use the formula for 1 as calculated dimension:

=IF(Aggr(Rank(Sum(TQTY),4),TerrNo, Professional_Id, PlanId)=1,PlanName)

Just can't have both Top Plan 1, Top Plan 2, and Top Plan 3 all in one table as calculated dimensions.

Hope this helps!