New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for
Did you mean:
Highlighted
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
Highlighted
Master

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") 😉
Highlighted
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

Highlighted
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

Highlighted
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

Highlighted
Partner

hi

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

Thanks

Highlighted
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

Highlighted
Master

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") 😉
Highlighted
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

Highlighted
Specialist II

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