Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Median to be included in the ascending order?

You can see the Median displayed last, actually can this be displayed in the ascending order, i mean in this example just next to age_band 46-55.

Thanks,

Ram

5 Replies
SergeyMak
Partner Ambassador
Partner Ambassador

Hi Ramkumar,

I think it's because you use Dimensionality()=0

As I know, it means Total.

That's why it's not affected by Sort Order.

Regards,
Sergey
SergeyMak
Partner Ambassador
Partner Ambassador

PFA

Regards,
Sergey
eduardo_sommer
Partner - Specialist
Partner - Specialist

I added a line with 'Median' as age_band, excluded the Total option in the dimension limit tab and changed the expression to

    =if(age_band='Median', Median({<age_band=-{'Median'}>}total salary), sum(salary))

The qvw is attached.

Eduardo

Not applicable
Author

Thanks for your solutions, very thoughtful indeed.

Actually the formula is more dynamic. Median is just an example. it basically is like this. I have a set of rows, and I want to add an arbitrary row in addition to that. Very similar to reference lines, but that needs to be displayed just as the data item (row).

Thanks,

Ram

SergeyMak
Partner Ambassador
Partner Ambassador

You can try use

=ValueList($(=chr(39) & Concat(Replace(age_band,'-','..'),chr(39) & ','& chr(39)) & chr(39)),'Median')

for dimension,

but I haven't found what expression is appropriate to get a correct result

Regards,
Sergey