<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Calculated Dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/240784#M91257</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a very simple question for Calculated Dimension.&lt;/P&gt;&lt;P&gt;I have a field in which I have values starting from 1 to 50&lt;/P&gt;&lt;P&gt;I want to calculate dimensions to categorise these values like below&lt;/P&gt;&lt;P&gt;1 day&lt;/P&gt;&lt;P&gt;5 to 10 days&lt;/P&gt;&lt;P&gt;10 to 15 days&lt;/P&gt;&lt;P&gt;15 to 20 days&lt;/P&gt;&lt;P&gt;greater than 20 days&lt;/P&gt;&lt;P&gt;I am using the following script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if([Length of stay]=1,'1 day',&lt;BR /&gt;if([Length of stay]&amp;gt;1 and [Length of stay]&amp;lt;=5,'2 to 5 days',&lt;BR /&gt;if([Length of stay]&amp;gt;5 and [Length of stay]&amp;lt;=10,'6 to 10 days',&lt;BR /&gt;if([Length of stay]&amp;gt;10 and [Length of stay]&amp;lt;=15,'11 to 15 days',&lt;BR /&gt;if([Length of stay]&amp;gt;15 and [Length of stay]&amp;lt;=20,'16 to 15 days',&lt;BR /&gt;if([Length of stay]&amp;gt;21,'greater than 21 days','other'))))))&lt;/P&gt;&lt;P&gt;I think this is working fine but my legend is showing me this code and when i hover over chart I am also seeing this code I want to see the numbers instead of code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cananyone help me please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Waqas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Feb 2010 17:44:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-02-17T17:44:25Z</dc:date>
    <item>
      <title>Calculated Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/240784#M91257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a very simple question for Calculated Dimension.&lt;/P&gt;&lt;P&gt;I have a field in which I have values starting from 1 to 50&lt;/P&gt;&lt;P&gt;I want to calculate dimensions to categorise these values like below&lt;/P&gt;&lt;P&gt;1 day&lt;/P&gt;&lt;P&gt;5 to 10 days&lt;/P&gt;&lt;P&gt;10 to 15 days&lt;/P&gt;&lt;P&gt;15 to 20 days&lt;/P&gt;&lt;P&gt;greater than 20 days&lt;/P&gt;&lt;P&gt;I am using the following script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if([Length of stay]=1,'1 day',&lt;BR /&gt;if([Length of stay]&amp;gt;1 and [Length of stay]&amp;lt;=5,'2 to 5 days',&lt;BR /&gt;if([Length of stay]&amp;gt;5 and [Length of stay]&amp;lt;=10,'6 to 10 days',&lt;BR /&gt;if([Length of stay]&amp;gt;10 and [Length of stay]&amp;lt;=15,'11 to 15 days',&lt;BR /&gt;if([Length of stay]&amp;gt;15 and [Length of stay]&amp;lt;=20,'16 to 15 days',&lt;BR /&gt;if([Length of stay]&amp;gt;21,'greater than 21 days','other'))))))&lt;/P&gt;&lt;P&gt;I think this is working fine but my legend is showing me this code and when i hover over chart I am also seeing this code I want to see the numbers instead of code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cananyone help me please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Waqas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 17:44:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/240784#M91257</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-17T17:44:25Z</dc:date>
    </item>
    <item>
      <title>Calculated Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/240785#M91258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you add a label to the calculated dimension, you will then not see the expression and see the label&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 18:22:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/240785#M91258</guid>
      <dc:creator />
      <dc:date>2010-02-17T18:22:50Z</dc:date>
    </item>
    <item>
      <title>Calculated Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/240786#M91259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A little off topic, but since the IF statements are checked in sequence, you can simplify:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;=if([Length of stay] = 1, '1 day',&lt;BR /&gt; if([Length of stay]&amp;lt;= 5, '2 to 5 days',&lt;BR /&gt; if([Length of stay]&amp;lt;=10, '6 to 10 days',&lt;BR /&gt; if([Length of stay]&amp;lt;=15,'11 to 15 days',&lt;BR /&gt; if([Length of stay]&amp;lt;=20,'16 to 20 days',&lt;BR /&gt; if([Length of stay]&amp;gt; 21,'greater than 21 days'&lt;BR /&gt; ,'other'))))))&lt;/P&gt;&lt;P&gt;You might also be better off moving this expression into your script, establishing a [Length of Stay Group] or some such. That would also incidentally fix your original problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 22:32:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/240786#M91259</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-02-17T22:32:42Z</dc:date>
    </item>
    <item>
      <title>Calculated Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/240787#M91260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to use class() function in the script to calculate this field.&lt;/P&gt;&lt;P&gt;In any case, as John said, you would be better off moving this code to your script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 22:39:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/240787#M91260</guid>
      <dc:creator>disqr_rm</dc:creator>
      <dc:date>2010-02-17T22:39:22Z</dc:date>
    </item>
    <item>
      <title>Calculated Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/240788#M91261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Rakesh wrote:You should be able to use class() function in the script to calculate this field.&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Except that the intervals aren't even. Some of them are, but not all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 22:59:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/240788#M91261</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-02-17T22:59:20Z</dc:date>
    </item>
    <item>
      <title>Calculated Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/240789#M91262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thak you so much Neil, John and Rakesh.&lt;/P&gt;&lt;P&gt;At the moment i have fixed this problem as Neil suggested but i would like to know how can I move this to my script, as I know when the data grows calculated dimension is not a good idea. John can you please help me with this?&lt;/P&gt;&lt;P&gt;Rakesh can you please tell me about Class function? how is works with the help of an example. I want to learn it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Waqas&lt;/P&gt;&lt;P&gt;Waqas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 11:12:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/240789#M91262</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-18T11:12:34Z</dc:date>
    </item>
    <item>
      <title>Calculated Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/240790#M91263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all again&lt;/P&gt;&lt;P&gt;I used John's post to move my If statement to script - working perfectly fine &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;here is the link&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/forums/p/22135/84583.aspx#84583"&gt;http://community.qlik.com/forums/p/22135/84583.aspx#84583&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am still waiting for the Class function though&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Waqas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 12:53:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/240790#M91263</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-18T12:53:57Z</dc:date>
    </item>
    <item>
      <title>Calculated Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/240791#M91264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Enclosed is an example of Class. Pretty useful, but only if you have equal rage values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 17:24:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/240791#M91264</guid>
      <dc:creator>disqr_rm</dc:creator>
      <dc:date>2010-02-18T17:24:50Z</dc:date>
    </item>
    <item>
      <title>Calculated Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/240792#M91265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much Rakesh. It was indeed very helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Waqas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 10:43:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension/m-p/240792#M91265</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-19T10:43:51Z</dc:date>
    </item>
  </channel>
</rss>

