Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a chart that displays a list of my top customers. This is adjusted by a slider that has a variable vTopN. It all works fine except the actual total is a sum of all customers and not what I set my slider to i.e. I set the slider to 5 - it shows me only 5 customers and there sales but the total is still the total of all customers. I have searched the site for a answer but do not know enough about codeing to work it out myself. I have tried certain sugestions i have seen in the forums like set the expression total to Sum of rows, but my total still remained of all customers.
My current expression is:
sum({$<Transaction={'Bills'}, Ledger={'Actuals'}, Year={$(=Max(Year))}, Quarter=, Month=, Week=, Day=, Date=>}[Billed Net Value])
Please help...
Hi Steve,
Here you are two possible solutions.
See attached. (there are two tables with the solution)
I hope it helps you.
Regards.
do you can upload the qvw for more detail about the graph and the variable?
Please find variable issue 050810 attached
Qvw requires user and password.
Hi, sorry this is the first time I am uploading something. I think it should be ok. I had hidden script with section access. I have removed this. I hope it open ok now.
Hi,
you need to recompile after erase the section access.
Done
Hi,
You just show the rows (5 rows, 10 rows), but the expression was calculated for all.
So you need to put a condition into your expression and wiil be work fine!
= if(rowno() <= $(vTopN),
num(sum({$<Transaction={'Bills'}....
Hi Everyone
Thank you very much for the assistance and the answer from Eduardo, I really appreciate the time and effort taken to help me with this issue.
Hi,
There is still one issue. The code Eduardo gave me above does indeed limit the results to what the slider is set at i.e. 5 customers, but it seems to take the first 5 customers in the table instead of taking the Top five customers. So I have this list where the sales manager wants to see his top performing customers, by default I set the slider to 5 but it needs to be adjustable, does anyone know the final piece here so I can get the result required?