Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good Afternoon,
I have a problem with two "sort" on the same table.
I have two dimensions Product and Customer and two metrics Value and Price.
The goal was to create a Bottom 3 of Customers by Product, I had to apply a formula so it does not consider the zeros.
But now I want to do two sort on the same table, so I want to do "sort" the Customers by Price (Ascending) and then I still want to do "sort" the Products By Value (Only for Total Product - Descending).
What is happening now is the table does the "sort" for total of all values and not by total of the three values on the table (Partial Total), although show the right totals.
You may confirm the example (.qvw) (In Attachment).
The result I wanted to present is:
Customer | Product | Value | Price |
---|---|---|---|
10 | D | 0 | -1 |
5 | D | 5 | 0,5 |
12 | D | 4 | 0,65 |
Total | Total D | 9 | 0,15 |
5 | B | -1,5 | -0,25 |
17 | B | 4 | 2 |
20 | B | 4 | 2 |
Total | Total B | 6,5 | 3,75 |
9 | A | -3,6 | -2,3 |
8 | A | 3 | 1 |
6 | A | 5 | 2,5 |
Total | Total A | 4,4 | 1,2 |
2 | C | 0 | -0,3 |
6 | C | 1 | 1,6 |
9 | C | -4,8 | 2 |
Total | Total C | -3,8 | 3,3 |
I hope someone can help me.
Thanks in advance.
Ana
Hello Everyone
Thanks for your help, but I already solved my problem.
I've attached the example qvw with solution, if someone has interested.
Ana
Some suggestion, please?
Hi,
Try by giving sort condtion as expression aggr(sum(),) with ur necesary column
The table has the same behavior.
I already try many things but the table keeps the "sort" of all values. I need to do the "sort" just to values on the table.
up to my knowledge,I think the problem is in your expression used. i tried removing the '-' you used in your expression it is working. but the logic becomes wrong now. So try building some other expression. It may work
Hi,
You can enable the interactive sort option based on the user needs you can sort the same .
hi ana,
please have a look at below post if you are looking for sort in Pivot:
Hello Everyone
Thanks for your help, but I already solved my problem.
I've attached the example qvw with solution, if someone has interested.
Ana