Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
jolivares
Specialist
Specialist

Order by in a Pivot Table

Hi Communitty,

Below you can find a QVW attached where I was trying to order a pivot table by Date (Field = S_Date), but I failed.

Table A is working but no Table B, check that weeks are no responding to the order by.  See months Dec and Sep.

Can someone see what is happening.

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Replace the S_Week dimension with a calculated dimension: =dual(S_Week, WeekStart(S_Date)). Sort that ascending.


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
datanibbler
Champion
Champion

Hi Juan,

I cannot tell what's the matter in September.

In Dec, though - that's a phenomenon that i guess many experienced, myself included: It's because the last days of December were effectively in week #1 (of this year). The solution is, in your master_calendar, to build a "alt_week" where you have a week #53 in that case (when the last days of Dec are in week #1 of the following year) and sort by that. You don't have to display it in the table.

HTH

Best regards,

DataNibbler

bbi_mba_76
Partner - Specialist
Partner - Specialist

Hi,

have you tried with =max(S_Date) to sort the week?

Remove the other marks for S_Week and set sort ascending

For each week you have more S_Date, so you have to use an aggregation function.

Not applicable

Use Load Order "Reversed"........ and remove other check box

Selva

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Replace the S_Week dimension with a calculated dimension: =dual(S_Week, WeekStart(S_Date)). Sort that ascending.


talk is cheap, supply exceeds demand
preminqlik
Specialist II
Specialist II

actually for your week dimension sort conditions are more ,

go to sort tab>> uncheck all the boxes except for expression  add foloowing expression

only({1}num#(S_Week))

and keep it ascending ....thats it....please find attachment below...