Qlik Community

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 
Search instead for 
Did you mean: 
Highlighted
Contributor III
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
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
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).

 

ProductWeightweight/3 (ascending order)Rank of column CWeight/3 in descending orderRank of Column E
A22976.333333331789
B23076.666666672788
C23177377.666666677
D23277.33333333477.666666676
E23377.66666667577.666666675
F23377.66666667677.333333334
G23377.666666677773
H23478876.666666672
I23478976.333333331

 

Thanks,

JF

Highlighted
Partner
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
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
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
Contributor III

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

A2.PNG

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.

 
ProductWeightDivRank ASC
A22976.333333331
B23076.666666672
C231773
D23277.333333334
E23377.666666675
F23377.666666676
G23377.666666677
H234788
I234789

 

 
 
 
Highlighted
Master
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
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
Specialist II

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