Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
AleksandrShergin
Contributor
Contributor

Sort value on top, then descending on another dimension

Hi all!
I'm new here, I really need your help.🖐
I have a source table with 3 dimensions

 
Date1 Product Value
31.01.2023 D 15
30.01.2023 C 0
31.01.2023 C 10
31.01.2023 B 0
28.01.2023 B 0
31.01.2023 A 0
29.01.2023 B 5
27.01.2023 B 10
30.01.2023 A 12
 

My goal is to sort it like this

Date1 Product Value
31.01.2023 A 0
31.01.2023 B 0
30.01.2023 B 0
30.01.2023 C 0
29.01.2023 A 0
28.01.2023 A 0
31.01.2023 B 15
31.01.2023 C 10
30.01.2023 D 20

 

So that zeros are at the top, sorted by date in descending order and product alphabetically, all other values are also sorted by date in descending order and product alphabetically.

I know it can be done with a hidden column, but my goal is not to use an extra column.

When I sort by value expression I don't get what I want

P1.png

Not all dates are descending

I want to get this result

P2.png

I attach an example qvw

It seems like it should be very simple, but I can't find a solution.
I would appreciate any help ‌‌‌‌‌‌🙏

2 Replies
Kushal_Chawda

@AleksandrShergin  in Sort Property,  do the sorting in below order. see the attached

1) Value -> Numeric ascending

2) Date ->  Numeric descending

3) Product -> Text A-Z

 

AleksandrShergin
Contributor
Contributor
Author

@Kushal_Chawda 

Thanks for the answer, but it gives the following result 
P3.png

When the zeros run out, the dates are inconsistent.

I need this result

P2.png