New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for
Did you mean:
Contributor III

Reverse Numeric Order

Hi All,

I have created a table and I calculated some values in one of the column. Now I want to put the calculated values in the following order, largest to smallest. Someone please help as I am new to qliksense.

Thanks,

JF

12 Replies
Master II

can you share a sample data and develop your need

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Contributor III

Hi Taoufiq ZARRA,

Below is an example of what I am trying to achieve. By using rank function I was able to get column A through D (which are columns titled Product, Weight, etc). I was also able to get column F by doing rank(-) which gave me the rank in descending order. Now I am struggling with putting weight/3 in descending order (see what I want to accomplish in column E highlighted in red).

 Product Weight weight/3 (ascending order) Rank of column C Weight/3 in descending order Rank of Column E A 229 76.33333333 1 78 9 B 230 76.66666667 2 78 8 C 231 77 3 77.66666667 7 D 232 77.33333333 4 77.66666667 6 E 233 77.66666667 5 77.66666667 5 F 233 77.66666667 6 77.33333333 4 G 233 77.66666667 7 77 3 H 234 78 8 76.66666667 2 I 234 78 9 76.33333333 1

Thanks,

JF

Partner

Hi

I think you will not get but you can do it as separate tables because the values will be corresponding to the dimensions that are present in the table when you want to sort the same column in different sorting order it will affect the dimensions, so it is better to create separate tables for both ascending and descending.

Hope this helps

Thanks

Contributor III

Hi Kashyap,

Thank you for your input. Each column is a section of a formula. My ultimate goal is to combine the columns (which is a formula) to create a KPI. The table was a way of knowing whether I was getting each section of the formula do what it is supposed to do. Do you know if I could perhaps do this "Weight/3 in descending order" as a variable? Would that work?

Thanks,

JF

Partner

hi

Can u please share the KPI details what u exactly want to create and what is the output is required.

Thanks

Contributor III

This is the formula I want to use as a KPI.

Div is the column titled Div in the table below.

For example, for k=1, the first iteration, would be [(2*1 - 1)*(ln(76.333333) + ln(1 - 78))]

note: ln(76.33333) is the Div at RankASC = 1 and ln(1-78), the 78 is the Div at RankASC = 9.

for k=2 we would have: [(2*2 - 1)*(ln(76.666667) + ln (1 - 78))]

for k=3 we would have: [(2*3 - 1)*(ln(77) + ln (1 - 77.666667))] and so on.

Then I sum up all of the iteration together.

I am aware I can use rowNo() to get Div but the dataset I am working on, I am not allowed to put Div in the ascending order. I have to use the rank # to get to the Div of my interest.

 Product Weight Div Rank ASC A 229 76.33333333 1 B 230 76.66666667 2 C 231 77 3 D 232 77.33333333 4 E 233 77.66666667 5 F 233 77.66666667 6 G 233 77.66666667 7 H 234 78 8 I 234 78 9

Master II

is it possible to propose something but at the  load script level ?

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Contributor III

Unfortunately I cannot do that because I have a lot of other things I am doing with this dashboard... It has to be done in KPI/charts etc

Specialist II

If you are doing complex calculations, why don't you just integrate Qlik Sense with R?

Tags