topic Re: Reverse Numeric Order in New to Qlik Sense
https://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662248#M154662
<P>Hi Taoufiq ZARRA,</P><P> </P><P>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).</P><P> </P><TABLE><TBODY><TR><TD>Product</TD><TD>Weight</TD><TD>weight/3 (ascending order)</TD><TD>Rank of column C</TD><TD><FONT color="#ff0000">Weight/3 in descending order</FONT></TD><TD>Rank of Column E</TD></TR><TR><TD>A</TD><TD>229</TD><TD>76.33333333</TD><TD>1</TD><TD>78</TD><TD>9</TD></TR><TR><TD>B</TD><TD>230</TD><TD>76.66666667</TD><TD>2</TD><TD>78</TD><TD>8</TD></TR><TR><TD>C</TD><TD>231</TD><TD>77</TD><TD>3</TD><TD>77.66666667</TD><TD>7</TD></TR><TR><TD>D</TD><TD>232</TD><TD>77.33333333</TD><TD>4</TD><TD>77.66666667</TD><TD>6</TD></TR><TR><TD>E</TD><TD>233</TD><TD>77.66666667</TD><TD>5</TD><TD>77.66666667</TD><TD>5</TD></TR><TR><TD>F</TD><TD>233</TD><TD>77.66666667</TD><TD>6</TD><TD>77.33333333</TD><TD>4</TD></TR><TR><TD>G</TD><TD>233</TD><TD>77.66666667</TD><TD>7</TD><TD>77</TD><TD>3</TD></TR><TR><TD>H</TD><TD>234</TD><TD>78</TD><TD>8</TD><TD>76.66666667</TD><TD>2</TD></TR><TR><TD>I</TD><TD>234</TD><TD>78</TD><TD>9</TD><TD>76.33333333</TD><TD>1</TD></TR></TBODY></TABLE><P> </P><P>Thanks,</P><P>JF</P>Thu, 02 Jan 2020 20:19:20 GMTjorgett2020-01-02T20:19:20ZReverse Numeric Order
https://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662197#M154634
<P><U>Hi All,</U></P><P>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.</P><P>Thanks,</P><P>JF</P>Thu, 02 Jan 2020 17:06:07 GMThttps://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662197#M154634jorgett2020-01-02T17:06:07ZRe: Reverse Numeric Order
https://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662242#M154658
<P>can you share a sample data and develop your need</P>Thu, 02 Jan 2020 19:57:22 GMThttps://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662242#M154658Taoufiq_Zarra2020-01-02T19:57:22ZRe: Reverse Numeric Order
https://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662248#M154662
<P>Hi Taoufiq ZARRA,</P><P> </P><P>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).</P><P> </P><TABLE><TBODY><TR><TD>Product</TD><TD>Weight</TD><TD>weight/3 (ascending order)</TD><TD>Rank of column C</TD><TD><FONT color="#ff0000">Weight/3 in descending order</FONT></TD><TD>Rank of Column E</TD></TR><TR><TD>A</TD><TD>229</TD><TD>76.33333333</TD><TD>1</TD><TD>78</TD><TD>9</TD></TR><TR><TD>B</TD><TD>230</TD><TD>76.66666667</TD><TD>2</TD><TD>78</TD><TD>8</TD></TR><TR><TD>C</TD><TD>231</TD><TD>77</TD><TD>3</TD><TD>77.66666667</TD><TD>7</TD></TR><TR><TD>D</TD><TD>232</TD><TD>77.33333333</TD><TD>4</TD><TD>77.66666667</TD><TD>6</TD></TR><TR><TD>E</TD><TD>233</TD><TD>77.66666667</TD><TD>5</TD><TD>77.66666667</TD><TD>5</TD></TR><TR><TD>F</TD><TD>233</TD><TD>77.66666667</TD><TD>6</TD><TD>77.33333333</TD><TD>4</TD></TR><TR><TD>G</TD><TD>233</TD><TD>77.66666667</TD><TD>7</TD><TD>77</TD><TD>3</TD></TR><TR><TD>H</TD><TD>234</TD><TD>78</TD><TD>8</TD><TD>76.66666667</TD><TD>2</TD></TR><TR><TD>I</TD><TD>234</TD><TD>78</TD><TD>9</TD><TD>76.33333333</TD><TD>1</TD></TR></TBODY></TABLE><P> </P><P>Thanks,</P><P>JF</P>Thu, 02 Jan 2020 20:19:20 GMThttps://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662248#M154662jorgett2020-01-02T20:19:20ZRe: Reverse Numeric Order
https://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662306#M154675
<P>Hi </P><P>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.</P><P>Hope this helps</P><P>Thanks</P>Fri, 03 Jan 2020 05:29:16 GMThttps://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662306#M154675kashyap2020-01-03T05:29:16ZRe: Reverse Numeric Order
https://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662447#M154730
<P>Hi Kashyap,</P><P>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 "<FONT color="#ff0000">Weight/3 in descending order<FONT color="#000000">" as a variable? Would that work?</FONT></FONT></P><P>Thanks,</P><P>JF</P><P> </P>Fri, 03 Jan 2020 14:00:03 GMThttps://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662447#M154730jorgett2020-01-03T14:00:03ZRe: Reverse Numeric Order
https://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662520#M154739
<P>hi </P><P>Can u please share the KPI details what u exactly want to create and what is the output is required.</P><P>Thanks</P>Fri, 03 Jan 2020 16:46:05 GMThttps://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662520#M154739kashyap2020-01-03T16:46:05ZRe: Reverse Numeric Order
https://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662547#M154743
<P>This is the formula I want to use as a KPI.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="A2.PNG" style="width: 447px;"><img src="https://community.qlik.com/t5/image/serverpage/image-id/26348i19207EA263F67E68/image-size/large?v=1.0&px=999" role="button" title="A2.PNG" alt="A2.PNG" /></span></P><P>Div is the column titled Div in the table below.</P><P>For example, for k=1, the first iteration, would be [(2*1 - 1)*(ln(76.333333) + ln(1 - 78))]</P><P>note: ln(76.33333) is the Div at RankASC = 1 and ln(1-78), the 78 is the Div at RankASC = 9.</P><P>for k=2 we would have: [(2*2 - 1)*(ln(76.666667) + ln (1 - 78))]</P><P>for k=3 we would have: [(2*3 - 1)*(ln(77) + ln (1 - 77.666667))] and so on.</P><P>Then I sum up all of the iteration together.</P><P>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.</P><DIV class="mceNonEditable lia-copypaste-placeholder"><DIV class="mceNonEditable lia-copypaste-placeholder"> </DIV></DIV><TABLE><TBODY><TR><TD>Product</TD><TD>Weight</TD><TD>Div</TD><TD>Rank ASC</TD></TR><TR><TD>A</TD><TD>229</TD><TD>76.33333333</TD><TD>1</TD></TR><TR><TD>B</TD><TD>230</TD><TD>76.66666667</TD><TD>2</TD></TR><TR><TD>C</TD><TD>231</TD><TD>77</TD><TD>3</TD></TR><TR><TD>D</TD><TD>232</TD><TD>77.33333333</TD><TD>4</TD></TR><TR><TD>E</TD><TD>233</TD><TD>77.66666667</TD><TD>5</TD></TR><TR><TD>F</TD><TD>233</TD><TD>77.66666667</TD><TD>6</TD></TR><TR><TD>G</TD><TD>233</TD><TD>77.66666667</TD><TD>7</TD></TR><TR><TD>H</TD><TD>234</TD><TD>78</TD><TD>8</TD></TR><TR><TD>I</TD><TD>234</TD><TD>78</TD><TD>9</TD></TR></TBODY></TABLE><P> </P><DIV class="mceNonEditable lia-copypaste-placeholder"> </DIV><DIV class="mceNonEditable lia-copypaste-placeholder"> </DIV><DIV class="mceNonEditable lia-copypaste-placeholder"> </DIV>Fri, 03 Jan 2020 18:30:59 GMThttps://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662547#M154743jorgett2020-01-03T18:30:59ZRe: Reverse Numeric Order
https://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662554#M154745
<P>is it possible to propose something but at the load script level ?</P>Fri, 03 Jan 2020 18:58:55 GMThttps://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662554#M154745Taoufiq_Zarra2020-01-03T18:58:55ZRe: Reverse Numeric Order
https://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662558#M154747
<P>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</P>Fri, 03 Jan 2020 19:06:54 GMThttps://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662558#M154747jorgett2020-01-03T19:06:54ZRe: Reverse Numeric Order
https://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662586#M154751
<P>If you are doing complex calculations, why don't you just integrate Qlik Sense with R?</P>Fri, 03 Jan 2020 21:38:43 GMThttps://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1662586#M154751lorenzoconforti2020-01-03T21:38:43ZRe: Reverse Numeric Order
https://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1663048#M154891
<P>Hi Lorenzoconforti,</P><P>I am new to qlik sense so I was not aware of such tool. Do you know any good posts/articles that teach this concept and how to do it? </P><P>Thanks,</P><P>JF</P>Mon, 06 Jan 2020 17:56:49 GMThttps://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1663048#M154891jorgett2020-01-06T17:56:49ZRe: Reverse Numeric Order
https://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1663349#M154974
<P>Hi</P><P>R is a programming language that has been around for quite a while now that is used predominantly for statistical analysis. It can be integrated with Qlik Sense where data is passed from Sense to R that performs the calculations in the background and provides results back to Sense for visualisation. It's very powerful but you will need to understand how to code in R and how to manage the integration. </P><P>Integration overview: <A href="https://support.qlik.com/articles/000039436" target="_blank">https://support.qlik.com/articles/000039436</A></P><P>Info on R: <A href="https://en.wikipedia.org/wiki/R_(programming_language)" target="_blank">https://en.wikipedia.org/wiki/R_(programming_language)</A></P><P>Then if you search the forum you'll find some info. </P><P>It's feasible but if you are new to it there is a certain learning curve. At the same time I couldn't think of a solution to calculating your KPI so my only (although complex) suggestion would be to use R</P>Tue, 07 Jan 2020 15:58:49 GMThttps://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1663349#M154974lorenzoconforti2020-01-07T15:58:49ZRe: Reverse Numeric Order
https://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1663779#M155065
<P>Hi Lorenzoconforti,</P><P>Thank you for the information, I appreciate it. I do not have admin rights, I cannot access the QMC, but I have put in a request with my workplace helpdesk to see if they will do the integration for me. Meanwhile, I will try to find a way to solve this within qlik sense. Thank you once again.</P><P>Best,</P><P>JF</P><P> </P>Wed, 08 Jan 2020 15:57:46 GMThttps://community.qlik.com/t5/New-to-Qlik-Sense/Reverse-Numeric-Order/m-p/1663779#M155065jorgett2020-01-08T15:57:46Z