<?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 Including an dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Including-an-dimension/m-p/187487#M51146</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This does not work as per my requiremment the reason why i am not prefering to change data model is i have some complex sql query calculation in my datamodel , i am joining 11 tables on different keys , its so confusing , the case statement what i have for available hours in my sql query is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE&lt;BR /&gt; WHEN B.HOUR_SEG_PRIME = 'AM-OS:12 AM - 7 AM' THEN 0.292&lt;BR /&gt; WHEN B.HOUR_SEG_PRIME = 'AM-Eng:7 AM - 9 AM' THEN 0.083&lt;BR /&gt; WHEN B.HOUR_SEG_PRIME = 'Prime Time:9 AM - 7 PM' THEN 0.417&lt;BR /&gt; WHEN B.HOUR_SEG_PRIME = 'PM-Eng:7 PM - 10 PM' THEN 0.125&lt;BR /&gt; WHEN B.HOUR_SEG_PRIME = 'PM-OS:10 PM - 12 AM' THEN 0.083&lt;BR /&gt; END&lt;BR /&gt; )* 24 AS Available_Hours&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i am taking this avaible hours and multiplying by 7 and multiplying with count of testers and using it as an expression for getting available hours for the testers selected for a particualr category for the selected week.&lt;/P&gt;&lt;P&gt;and used_hours is an already calculated column in my table it is prettry staright forward that sum(used_hours) is the total usage by selected testers.&lt;/P&gt;&lt;P&gt;all i wanted is the value obtained by the expression&lt;/P&gt;&lt;P&gt;"(Count (DISTINCT TESTER)*7*AVAILABLE_HOURS) - sum(used_hours)" to be displayed as one of the dimensions below the HOUR_SEG_PRIME values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Jan 2011 01:51:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-01-27T01:51:41Z</dc:date>
    <item>
      <title>Including an dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Including-an-dimension/m-p/187481#M51140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have 2 expressions one for Availble Hours and one for used hours,&lt;/P&gt;&lt;P&gt;Idle Hours = Avaible Hours - Used Hours , i need to include Idle Hours in the hour-seg-prime dimension( In the Avaible Hours By Week graph) , i have attached my qlikview file ..&lt;/P&gt;&lt;P&gt;Please Help&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jan 2011 21:14:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-an-dimension/m-p/187481#M51140</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-26T21:14:51Z</dc:date>
    </item>
    <item>
      <title>Including an dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Including-an-dimension/m-p/187482#M51141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know what you mean by including the idle hours in the dimension. Are you saying you want your dimension to look something like this?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;HOUR_SEG_PRIME&lt;BR /&gt;Prime Time: 9 AM - 7 PM (450 idle)&lt;BR /&gt;PM-OS: 10 PM - 12 AM (3,210 idle)&lt;BR /&gt;...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jan 2011 23:29:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-an-dimension/m-p/187482#M51141</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-01-26T23:29:23Z</dc:date>
    </item>
    <item>
      <title>Including an dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Including-an-dimension/m-p/187483#M51142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I Mean,&lt;/P&gt;&lt;P&gt;HOUR_SEG_PRIME:&lt;/P&gt;&lt;P&gt;Prime Time: 9 AM - 7 PM&lt;/P&gt;&lt;P&gt;PM-OS: 10 PM - 12 AM&lt;/P&gt;&lt;P&gt;Idle Hours&lt;/P&gt;&lt;P&gt;I want to show idle hours as one of the dimensions along with hour seg prime values..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jan 2011 23:36:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-an-dimension/m-p/187483#M51142</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-26T23:36:28Z</dc:date>
    </item>
    <item>
      <title>Including an dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Including-an-dimension/m-p/187484#M51143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No idea if I'm understanding. Sounds like you only want USED hours broken down by HOUR_SEG_PRIME, and then for Idle hours to be separate. The total would still be available hours. Let's take the week of 12/19/2010. Your "Available Hours By Week" is currently a stacked bar for this information:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;HOUR_SEG_PRIME Available&lt;BR /&gt;Prime Time:9 AM - 7 PM 4273.42&lt;BR /&gt;PM-OS:10 PM - 12 AM 822.70&lt;BR /&gt;PM-Eng:7 PM - 10 PM 1260.00&lt;BR /&gt;AM-OS:12 AM - 7 AM 2845.25&lt;BR /&gt;AM-Eng:7 AM - 9 AM 766.92&lt;/P&gt;&lt;P&gt;I think you want it to instead be a stacked bar for this information?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;HOUR_SEG_PRIME Available&lt;BR /&gt;Prime Time:9 AM - 7 PM 2374.27&lt;BR /&gt;PM-OS:10 PM - 12 AM 384.45&lt;BR /&gt;PM-Eng:7 PM - 10 PM 534.05&lt;BR /&gt;AM-OS:12 AM - 7 AM 1313.93&lt;BR /&gt;AM-Eng:7 AM - 9 AM 268.63&lt;BR /&gt;Idle Hours 5092.95&lt;/P&gt;&lt;P&gt;It would probably be best to set this up in your data model. I have no way to reload your data model to test anything, but where your data looks like this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;USER_ID, HOUR_SEG_PRIME, AVAILABLE_HOURS, USED_HOURS&lt;BR /&gt;krathod, PM-Eng: 7 PM - 10 PM, 3.00, 0.63&lt;/P&gt;&lt;P&gt;I might instead do this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;User, Hour Seg Prime, Hours&lt;BR /&gt;krathod, PM-Eng: 7 PM - 10 PM, 0.63&lt;BR /&gt;krathod, Idle Hours, 2.37&lt;/P&gt;&lt;P&gt;But I don't know your data and I don't know what else you're doing with it, so I can't say whether or not that's a good idea for you. All I can say is that it would solve your problem IF what you wanted what a stacked bar with the numbers I showed above. There are likely other solutions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 00:33:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-an-dimension/m-p/187484#M51143</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-01-27T00:33:33Z</dc:date>
    </item>
    <item>
      <title>Including an dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Including-an-dimension/m-p/187485#M51144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am extremely sorry for the confusion ,&lt;/P&gt;&lt;P&gt;i have pointed you to wrong graph , actually its Used Hours by week graph NOT Available hours by week.&lt;/P&gt;&lt;P&gt;As you said if you consider week 12/19/2010&lt;/P&gt;&lt;P&gt;the dimension in the USED HOURS BY WEEK should appear something like below :&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;HOUR_SEG_PRIME Available&lt;BR /&gt;Prime Time:9 AM - 7 PM 4273.42&lt;BR /&gt;PM-OS:10 PM - 12 AM 822.70&lt;BR /&gt;PM-Eng:7 PM - 10 PM 1260.00&lt;BR /&gt;AM-OS:12 AM - 7 AM 2845.25&lt;BR /&gt;AM-Eng:7 AM - 9 AM 766.92&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;IdleHours 5093&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Basically , i am calculating idle hours as sum(Avaible Hours) - sum(Used Hours).&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Please refer to the selection in the attached qvw now , hope it makes some sense now....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 00:57:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-an-dimension/m-p/187485#M51144</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-27T00:57:07Z</dc:date>
    </item>
    <item>
      <title>Including an dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Including-an-dimension/m-p/187486#M51145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doesn't matter which chart you modify if those are the numbers you want. If you were using my data model change:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Dimension 1 = Week&lt;BR /&gt;Dimension 2 = Hour Seg Prime&lt;BR /&gt;Expression = sum(Hours)&lt;/P&gt;&lt;P&gt;Clean charts like this are why I tend to prefer data model changes to chart charges. If you don't want to change the data model, and I assume you don't, you could probably do this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Dimension = Week&lt;BR /&gt;Expression 1 = sum({&amp;lt;HOUR_SEG_PRIME*={'Prime Time: 9 AM - 7 PM'}&amp;gt;} USED_HOURS)&lt;BR /&gt;Expression 2 = sum({&amp;lt;HOUR_SEG_PRIME*={'PM-OS: 10 PM - 12 AM'}&amp;gt;} USED_HOURS)&lt;BR /&gt;Expression 3 = sum({&amp;lt;HOUR_SEG_PRIME*={'PM-Eng: 7 PM - 10 PM'}&amp;gt;} USED_HOURS)&lt;BR /&gt;Expression 4 = sum({&amp;lt;HOUR_SEG_PRIME*={'AM-OS: 12 AM - 7 AM'}&amp;gt;} USED_HOURS)&lt;BR /&gt;Expression 5 = sum({&amp;lt;HOUR_SEG_PRIME*={'AM-Eng: 7 AM - 9 AM'}&amp;gt;} USED_HOURS)&lt;BR /&gt;Expression 5 = count(DISTINCT TESTER)*7*AVAILABLE_HOURS - USED_HOURS&lt;/P&gt;&lt;P&gt;That only works if you can't add new dimension values, or remember to add expressions every time you add new dimension values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 01:10:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-an-dimension/m-p/187486#M51145</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-01-27T01:10:21Z</dc:date>
    </item>
    <item>
      <title>Including an dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Including-an-dimension/m-p/187487#M51146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This does not work as per my requiremment the reason why i am not prefering to change data model is i have some complex sql query calculation in my datamodel , i am joining 11 tables on different keys , its so confusing , the case statement what i have for available hours in my sql query is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE&lt;BR /&gt; WHEN B.HOUR_SEG_PRIME = 'AM-OS:12 AM - 7 AM' THEN 0.292&lt;BR /&gt; WHEN B.HOUR_SEG_PRIME = 'AM-Eng:7 AM - 9 AM' THEN 0.083&lt;BR /&gt; WHEN B.HOUR_SEG_PRIME = 'Prime Time:9 AM - 7 PM' THEN 0.417&lt;BR /&gt; WHEN B.HOUR_SEG_PRIME = 'PM-Eng:7 PM - 10 PM' THEN 0.125&lt;BR /&gt; WHEN B.HOUR_SEG_PRIME = 'PM-OS:10 PM - 12 AM' THEN 0.083&lt;BR /&gt; END&lt;BR /&gt; )* 24 AS Available_Hours&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i am taking this avaible hours and multiplying by 7 and multiplying with count of testers and using it as an expression for getting available hours for the testers selected for a particualr category for the selected week.&lt;/P&gt;&lt;P&gt;and used_hours is an already calculated column in my table it is prettry staright forward that sum(used_hours) is the total usage by selected testers.&lt;/P&gt;&lt;P&gt;all i wanted is the value obtained by the expression&lt;/P&gt;&lt;P&gt;"(Count (DISTINCT TESTER)*7*AVAILABLE_HOURS) - sum(used_hours)" to be displayed as one of the dimensions below the HOUR_SEG_PRIME values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 01:51:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-an-dimension/m-p/187487#M51146</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-27T01:51:41Z</dc:date>
    </item>
    <item>
      <title>Including an dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Including-an-dimension/m-p/187488#M51147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Debugged. Had an extra space in the HOUR_SEG_PRIME values and needed to aggregate the Available and Used hours a little differently to calculate the idle hours. Also put expressions in opposite order:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Dimension = Week&lt;BR /&gt;Expression 1 = sum(aggr(count(DISTINCT TESTER)*7*AVAILABLE_HOURS,WEEK,HOUR_SEG_PRIME))-sum(USED_HOURS)&lt;BR /&gt;Expression 2 = sum({&amp;lt;HOUR_SEG_PRIME*={'AM-Eng:7 AM - 9 AM'}&amp;gt;} USED_HOURS)&lt;BR /&gt;Expression 3 = sum({&amp;lt;HOUR_SEG_PRIME*={'AM-OS:12 AM - 7 AM'}&amp;gt;} USED_HOURS)&lt;BR /&gt;etc.&lt;/P&gt;&lt;P&gt;See attached. Is that what you wanted?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 02:40:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-an-dimension/m-p/187488#M51147</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-01-27T02:40:54Z</dc:date>
    </item>
    <item>
      <title>Including an dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Including-an-dimension/m-p/187489#M51148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats exactly what i wanted ..thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 04:32:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-an-dimension/m-p/187489#M51148</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-27T04:32:36Z</dc:date>
    </item>
  </channel>
</rss>

