Qlik Community

Qlik Education Discussions

Discussion Board for collaboration related to Qlik Education.

ryanfoster84
Contributor

Sort Feature Not Working

Hi,

Can anyone help with an issue i am having. I have applied a background color to an expression in the definition field but when i try and sort the field nothing happens.

any suggestions?

thanks,

Ryan

11 Replies
whiteline
Honored Contributor II

Re: Sort Feature Not Working

Hi.

Could you provide some more info? The chart type. The expression that you've used.

The sample application would be the best choice.

ryanfoster84
Contributor

Re: Sort Feature Not Working

Hi,

Its a straight Table and the definition is as follows:

ColorMix2 (if(sum(ADV)/count([Trade Date])<5000,-Sqrt(-(sum(ADV)/count([Trade Date])-100)/(100-RangeMin (top(total sum(ADV)/count([Trade Date])

,1,NoOfRows(total))))),Sqrt((sum(ADV)/count([Trade Date])-100)/(RangeMax (top(total sum(ADV)/count([Trade Date]),1,NoOfRows(total)))-100)))

, ARGB(255, 255, 0, 0), ARGB(255, 0, 64, 128), ARGB(255, 255, 255, 255))

the table looks like this

12-5-2014 9-52-17 AM.jpg

I can't share the application as it contains sensitive information sorry.

whiteline
Honored Contributor II

Re: Sort Feature Not Working

Hi.

If you comment the color expression and everything works fine, then step by step try to avoid using inter-record functions and NoOfRows function.

morris70
Valued Contributor

Re: Sort Feature Not Working

Hi

It appears that the sort functions are put out of play when using ColorMix. I just tested it and get the same results. Not sure if this is a bug or not. I will look into it. You can still sort using the Dimension but apart from that it seems that no other sorting works.

ryanfoster84
Contributor

Re: Sort Feature Not Working

Hi Morris,

thanks for looking into it, it defiantly looks like a bug to me very frustrating!

thanks,

Ryan

Employee
Employee

Re: Sort Feature Not Working

No, it's not a bug.

If you use inter-record functions, e.g. Top(), Above(), etc., you need to sort by expression.

HIC

ryanfoster84
Contributor

Re: Sort Feature Not Working

so would you use the background color definition in the sort by expression? Eg

ColorMix2 (if(sum(ADV)/count([Trade Date])<5000,-Sqrt(-(sum(ADV)/count([Trade Date])-100)/(100-RangeMin (top(total sum(ADV)/count([Trade Date])

,1,NoOfRows(total))))),Sqrt((sum(ADV)/count([Trade Date])-100)/(RangeMax (top(total sum(ADV)/count([Trade Date]),1,NoOfRows(total)))-100)))

, ARGB(255, 255, 0, 0), ARGB(255, 0, 64, 128), ARGB(255, 255, 255, 255))

morris70
Valued Contributor

Re: Sort Feature Not Working

Hi

In this case I would use the expression used to calculate ADV or Passive Ratio as the Sort by expression. Again you can only do this on the dimension and not the expression.

ryanfoster84
Contributor

Re: Sort Feature Not Working

thanks for the reply works great, hopefully they fix this issue

Community Browser