Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
How to achieve top 15 records in pivot or straight table.
Thanks
Hi in straight table you can configure dimension limits, but if you want in pivot or quick-change graph you can use a calculated dimension, in example to filter top 15 Cutomers by Sales:
=Aggr(If(Rank(Sum(Sales))<=15, Customer), Customer)
Hi Ruben,
Top 15 records coming properly but in the first row one - is coming i dont want this but it will never effect on my total when i am hiding - .
And I dont want scroll in that pivot table.
Thanks
Consider that you have below in your script... Below examples are for TOP 10 but you can change it for top 15.
Employee:
Load * Inline
[
Employee, Salary
A, 10000
B, 20000
C, 24000
D, 40000
E, 100000
F, 50000
G, 125000
H, 80000
I, 75000
J, 40000
K, 50000
L, 35000
M, 25000
N, 50000
O, 35000
P, 20000
];
===================================
1) Using Calculated Dimension
Dimension = Calculated Dimension
=IF(Aggr(Rank(SUM(Salary),4),Employee)<=10,Employee)
Tick Suppress When Value is NULL
Expression = SUM(Salary)
2) Using Set Analysis in Expression
Dimension = Employee
Expression = SUM({<Employee = {"=Rank(SUM(Salary),4)<=10"}>}Salary)
3) Using Dimension Limit
Dimension = Employee
Expression = SUM(Sales)
Dimension Limits
Select Show only Largest 10 Values
4) If you want to show in Text Box
=CONCAT(IF(Aggr(Rank(SUM(Salary),4),Employee)<=10,Aggr(Employee&CHR(9)&MONEY(SUM(Salary),'#,##0'),Employee)),', '&CHR(10),-Aggr(SUM(Salary),Employee))
5) Using Script
Employee:
Load * Inline
[
Employee, Salary
A, 10000
B, 20000
C, 24000
D, 40000
E, 100000
F, 50000
G, 125000
H, 80000
I, 75000
J, 40000
K, 50000
L, 35000
M, 25000
N, 50000
O, 35000
P, 20000
];
NoConcatenate
Temp:
Load Employee, SUM(Salary) as Salary Resident Employee Group By Employee;
NoConcatenate
Final:
First 10
Load Employee, Salary Resident Temp Order By Salary Desc;
Drop Tables Employee, Temp;
Hope this helps...
Hi,
We can use dimension limits tab to set top 15 in the straight table.
In pivot table it can be acheived by writing expression like Aggr(If(Rank(Sum(Sales))<=15, Customer), Customer).
Not sure to understand... if you want the total to sum only filtered dimension you can use this expression:
Sum(Aggr(If(Rank(Sum(Sales))<=15, Sum(Sales)), Customer)) //This way you don't need calculated dimension.
Anyway Manish has given a lot of option to achieve the requirements
Hie..
=Aggr(If(Rank(Sum(Fieldname))<=15, Fieldname), Fieldname)
Hope this will helps you...!!
Regards,
Mohammad
Hi,
Pivot Table:
Calculated DImension:
=AGGR(IF(Rank(SUM(REVENUE),4)<=15,NAME),NAME)
Check 'SUPPRESS WHEN VALUE IS NULL'
Expression:
As per your requirement
Straight Table:
Dimension : Customer
Expression : =SUM({<Customer = {"=Rank(SUM(Sales),4)<=15"}>}Sales)
Regards
Neetha
Hi Manish,
Thanks for your response am getting top 15 but am getting one - records it will come on top row that row i don't want show the user .
please see the attachment in that how to hide and after hide that row total should remain as it is 8900.
Thanks
Tick suppress when value is null in Dimension Tab