<?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 Re: Can I set a variable in Chart Dimension? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Can-I-set-a-variable-in-Chart-Dimension/m-p/856635#M1016865</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see why this shouldn't be feasible, could you provide us with the dimensions and their calculated (expressions) you have?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Apr 2015 14:37:39 GMT</pubDate>
    <dc:creator>petter</dc:creator>
    <dc:date>2015-04-17T14:37:39Z</dc:date>
    <item>
      <title>Can I set a variable in Chart Dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-I-set-a-variable-in-Chart-Dimension/m-p/856634#M1016864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I calculate a value based upon two other record values. Here is an example:&lt;/P&gt;&lt;P&gt;round(60*24*(10000*Num(CallTime) - left(subfield(date#(CreationDate),'.',2),4))/10000)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is that I want to add 720 if it is less than -270 and then set to null if it is still less than 0 or more than 270.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can do this with a bunch of nested if statements in the calculated dimension but it will look cumbersome and be error prone if I need to make changes. Is there a place where I can calculate the value for each record and then refer to it by the variable name? I tried to do it in the load but didn't have much luck. I thought it would be more logical to define it in the dimension but it didn't seem possible. Not sure which approach is best.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On a somewhat unrelated note I also was surprised that Median was not an option when totaling values for expressions. Of course I wanted to get the Median for the calculated dimension which doesn't seem doable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 14:14:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-I-set-a-variable-in-Chart-Dimension/m-p/856634#M1016864</guid>
      <dc:creator />
      <dc:date>2015-04-17T14:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can I set a variable in Chart Dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-I-set-a-variable-in-Chart-Dimension/m-p/856635#M1016865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see why this shouldn't be feasible, could you provide us with the dimensions and their calculated (expressions) you have?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 14:37:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-I-set-a-variable-in-Chart-Dimension/m-p/856635#M1016865</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-04-17T14:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can I set a variable in Chart Dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-I-set-a-variable-in-Chart-Dimension/m-p/856636#M1016866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So this is the expression used in the calculated dimension:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;round(60*24*(10000*Num(CallTime) - left(subfield(date#(CreationDate),'.',2),4))/10000)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;CallTime is a string and CreationDate is a datetime. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 14:54:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-I-set-a-variable-in-Chart-Dimension/m-p/856636#M1016866</guid>
      <dc:creator />
      <dc:date>2015-04-17T14:54:24Z</dc:date>
    </item>
  </channel>
</rss>

