Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
March 26 at 10am ET: See how Qlik drives growth and value in ISV segment - REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Custom Sort Issue

Hi all,

I have applied a custom sort to a bar chart based on a month indicator. At the same time I have tried to apply the rule that I don't want anyone to be able to filter for with the month indicator by adding the set statement {<Month_Indicator=>}  to my calculation.

The weird thing is that if someone does click on anything in the Month_Indicator field, it moves that month to the beginning of the bar chart, which messes up the trend that I am trying to display. It does not filter for that Month, so the filter clause works.

The moment I disable the custom sort, it does not do that.

I have searched on the community for this type of error, but only come up with how to implement a custom sort.

has anyone come across this yet or have an idea on how to get around this?

Thank you for your assistance!

Lucille

1 Solution

Accepted Solutions
sunny_talwar

Try this as your sorting expression:

if(PeriodType= 'Monthly', Only({<Period>} Period),

if(PeriodType= 'Weekly', Only({<Period>} SubmissionYear&WeekIndicator),

if(PeriodType = 'Daily', Date(Only({<Period>} SubmissionDate),'YYYYMMDD'))))


Capture.PNG

View solution in original post

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Have you added that set modifier to your sort expression too? Perhaps you can post a small qlikview document that illustrates the problem.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi,

Thank you for responding.. I have attached the QV model, I have just removed all of the unnecessary and tried to mask it a bit.

I haven't added the set modifier to the sort expression. You will see that I need to be able to jump between monthly, weekly and daily as well..

I am not that fast with this site, so I just need to figure out how to attach the model

Thanks,

Lucille

Not applicable
Author

I managed to attach the model to my original discussion...

sunny_talwar

Try this as your sorting expression:

if(PeriodType= 'Monthly', Only({<Period>} Period),

if(PeriodType= 'Weekly', Only({<Period>} SubmissionYear&WeekIndicator),

if(PeriodType = 'Daily', Date(Only({<Period>} SubmissionDate),'YYYYMMDD'))))


Capture.PNG