<?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 help with an expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176459#M501955</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would do this as a set analysis.&lt;/P&gt;&lt;P&gt;For Used, it would be something like this: Count({$ &amp;lt;Usage={'&amp;gt;0'}&amp;gt;} Distinct Rumi_Device)&lt;/P&gt;&lt;P&gt;For Idle, the Expression would be something like this: Count({$ &amp;lt;Usage={0}&amp;gt;} Distinct Rumi_Device)&lt;/P&gt;&lt;P&gt;You can stack them or keep them separate by looking at the Style tab under Subtype.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aline&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Jan 2011 22:39:10 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-01-19T22:39:10Z</dc:date>
    <item>
      <title>help with an expression</title>
      <link>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176457#M501953</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 an expression sum(util_rate) which has value 0 and &amp;gt; 2&lt;/P&gt;&lt;P&gt;I need to have Xaxis with the stacked bars IDLE and USED(stacked with runi_devices values).&lt;/P&gt;&lt;P&gt;so for a selected filter , if sum(util_rate) &amp;gt; 2 then the device is considered as used or else Idle.&lt;/P&gt;&lt;P&gt;the is expression of count of devices.&lt;/P&gt;&lt;P&gt;Please help me , in giving the expression for idle and usage , or the best way to achive this.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jan 2011 19:57:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176457#M501953</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-19T19:57:33Z</dc:date>
    </item>
    <item>
      <title>help with an expression</title>
      <link>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176458#M501954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so i came up with am expression which gives the values i need but not sure how to segment them as a stacked bar chart ,&lt;/P&gt;&lt;P&gt;=if(sum(Avg(UTIL_RATE)&amp;gt;2),'used','idle') --- (dimension)&lt;/P&gt;&lt;P&gt;Count (DISTINCT RUMI_DEVICE) --- expresion&lt;/P&gt;&lt;P&gt;so i need to display idle and used bars(separare bars), segmented by distinct rumi_devices, displaying the count of rumi_devices .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jan 2011 22:14:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176458#M501954</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-19T22:14:49Z</dc:date>
    </item>
    <item>
      <title>help with an expression</title>
      <link>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176459#M501955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would do this as a set analysis.&lt;/P&gt;&lt;P&gt;For Used, it would be something like this: Count({$ &amp;lt;Usage={'&amp;gt;0'}&amp;gt;} Distinct Rumi_Device)&lt;/P&gt;&lt;P&gt;For Idle, the Expression would be something like this: Count({$ &amp;lt;Usage={0}&amp;gt;} Distinct Rumi_Device)&lt;/P&gt;&lt;P&gt;You can stack them or keep them separate by looking at the Style tab under Subtype.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aline&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jan 2011 22:39:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176459#M501955</guid>
      <dc:creator />
      <dc:date>2011-01-19T22:39:10Z</dc:date>
    </item>
    <item>
      <title>help with an expression</title>
      <link>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176460#M501956</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 need to have the above expression in set analysis , and the chart should display something like below, i am sorry for this but iam new to set analysis , i have attached an excel sheet for the graph am looking for , please let me know if you cant open it ..&lt;/P&gt;&lt;P&gt;I nee to have if(sum(Avg (UTIL_RATE)&amp;gt;2,'Used','Idle')) in set analysis i guess, i tried replacing the USAGE&amp;gt;0 with if(sum(Avg (UTIL_RATE)&amp;gt;2,'Used','Idle')) but i get an error,&lt;/P&gt;&lt;P&gt;[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/2235.rumi_5F00_scratch-_2800_2_2900_.xlsx:550:0]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jan 2011 22:58:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176460#M501956</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-19T22:58:14Z</dc:date>
    </item>
    <item>
      <title>help with an expression</title>
      <link>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176461#M501957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please can anybody help me with this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jan 2011 00:39:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176461#M501957</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-20T00:39:53Z</dc:date>
    </item>
    <item>
      <title>help with an expression</title>
      <link>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176462#M501958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest posting a QVW with sample data in it loaded with an inline load. Looking at your Excel file, I don't see anything that looks like raw data. For instance, you already have column for IDLE and IN-USE, and this column appears to have been entered manually. You also have a count, but again, it's just a number. Nothing seems to be being counted. The answer is probably simple, but I really can't understand what you're asking, so I can't answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jan 2011 01:23:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176462#M501958</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-01-20T01:23:48Z</dc:date>
    </item>
    <item>
      <title>help with an expression</title>
      <link>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176463#M501959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how do i attach my qlikview file??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jan 2011 02:01:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176463#M501959</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-20T02:01:35Z</dc:date>
    </item>
    <item>
      <title>help with an expression</title>
      <link>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176464#M501960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you create a post, you should see three tabs - Compose, Options and Preview. On the Options tab is an "Add/Update" button under the heading "File Attachment". Click on that button to upload the file from your computer and attach it to your post.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jan 2011 02:16:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176464#M501960</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-01-20T02:16:58Z</dc:date>
    </item>
    <item>
      <title>help with an expression</title>
      <link>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176465#M501961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jan 2011 02:18:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176465#M501961</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-20T02:18:59Z</dc:date>
    </item>
    <item>
      <title>help with an expression</title>
      <link>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176466#M501962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I think I have it. Your data appears to only have a single target, so I added a few additional targets to make sure I was getting both Idle and Used targets, and that the targets were stacking within these bars. I did it like this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Dimension 1 = =aggr(if(sum("AVG(UTIL_RATE)")&amp;gt;2,'Used','Idle'),TARGET)&lt;BR /&gt;Dimension 2 = Target&lt;BR /&gt;Expression = count(distinct RUMI_DEVICE)&lt;/P&gt;&lt;P&gt;See attached. Hopefully I've understood what you needed, and hopefully it will work in the real application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jan 2011 02:46:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176466#M501962</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-01-20T02:46:33Z</dc:date>
    </item>
    <item>
      <title>help with an expression</title>
      <link>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176467#M501963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much ,&lt;/P&gt;&lt;P&gt;But i dont understand why my app is showing only Idle bar , i copied the same thing , i am attaching my app here , you cannot work on it but atleast you can see the properties i guess.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jan 2011 03:07:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176467#M501963</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-20T03:07:32Z</dc:date>
    </item>
    <item>
      <title>help with an expression</title>
      <link>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176468#M501964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the column UTIL_RATE in my table not AVG(UTIL_RATE) , So i changed the calculated dimension to (removed the double quotes) , but still only idle is showing ..:-(&lt;/P&gt;&lt;P&gt;=aggr(if(sum(Avg(UTIL_RATE))&amp;gt;2,'Used','Idle'),TARGET)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what could be the possible reason for not displaying used and idle bars separetely?&lt;/P&gt;&lt;P&gt;Please help...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jan 2011 03:17:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176468#M501964</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-20T03:17:54Z</dc:date>
    </item>
    <item>
      <title>help with an expression</title>
      <link>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176469#M501965</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;RAMYA_BEGINNER wrote:what could be the possible reason for not displaying used and idle bars separetely?&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;It looks like you figured out that you need to replace "AVG(UTIL_RATE)" with "UTIL_RATE" since that's what the column is called in your actual data set. However, since you've also added the Calendar dimension, you need to aggr by that as well.&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;=aggr(if(sum(UTIL_RATE)&amp;gt;2,'Used','Idle'),Calendar,TARGET)&lt;/P&gt;&lt;P&gt;You can't tell that you need this in the sample data set because you have the same exact UTIL_RATE for every day. But you can see it if you, say, change the Calendar dimension to SITE_NAME. Then you can see, for example, that for Santa Clara, 8960_APPS is shown as Used even though sum(UTIL_RATE) is only 1. I assume you'd want this to show as Idle.&lt;/P&gt;&lt;P&gt;I hope you don't mind, but I'm going to post your private message to me here since I see no reason this shouldn't also be part of this thread:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;RAMYA_BEGINNER wrote:Hi&lt;BR /&gt;This is in continuation for the post&lt;BR /&gt;&lt;A href="http://community.qlik.com/forums/t/39662.aspx"&gt;http://community.qlik.com/forums/t/39662.aspx&lt;/A&gt;&lt;BR /&gt;thank you for the response for my question , i have an addition to my application , i need to add another line chart which shows , count of rumi devices in 3 lines ,&lt;BR /&gt;line for idle&lt;BR /&gt;line for used&lt;BR /&gt;line for all&lt;BR /&gt;i am able to get lines in the chart with calculated dimension condition for idle and used&lt;BR /&gt;=aggr(if(sum(UTIL_RATE)&amp;gt;2,'Used','Idle'),TARGET)&lt;BR /&gt;i need to combine another condition given below , to get a line displaying all count of all devices&lt;BR /&gt;=aggr(DISTINCT SUM(RUMI_DEVICE),TARGET)&lt;BR /&gt;How do i combine both of these expression into one , if combining is not an option , how can i achive 3 lines in my line chart displaying used,idle,all&lt;BR /&gt;Please let me know...&lt;BR /&gt;Thanks...&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I'd just use three separate expressions, and I'm assuming below that your dimension is again Calendar.&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Total = count(distinct RUMI_DEVICE)&lt;BR /&gt;Used = sum(aggr(if(sum(UTIL_RATE)&amp;gt;2,count(distinct RUMI_DEVICE)),Calendar,TARGET))&lt;BR /&gt;Idle = Total - Used&lt;/P&gt;&lt;P&gt;That seemed to work for me with your file, though I had te replace Calendar with SITE_NAME in order to verify. And if Calendar isn't your dimension, replace it in the expression above with whatever your dimension actually is.&lt;/P&gt;&lt;P&gt;To explain what's going on in the "Used" expression, the aggr(...,Calendar,TARGET) groups your data by calendar and target. So if you have Date selected in your Calendar, for each date and target, we sum(UTIL_RATE). If that sum is &amp;gt; 2, then that TARGET is Used for that Date. Therefore we must count the distinct RUMI_DEVICE for that Target. Finally, since TARGET isn't actually a dimension in our chart, we must sum up these counts for all Used TARGETS on that date to get our total Used RUMI_DEVICEs. Hopefully the other two expressions are obvious.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jan 2011 18:32:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-with-an-expression/m-p/176469#M501965</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-01-20T18:32:33Z</dc:date>
    </item>
  </channel>
</rss>

