<?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 sum values with condition measure based on a dimension in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245142#M24820</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Product_Type&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Sales&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Expected result : Product Type without sales&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Type1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;899&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Type2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;345&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Type3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Type4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;567&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Type5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;235&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Type6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;456&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Type7&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Type8&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;46&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Type9&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I have a table like above one (agg all the rows based on sales) I am trying to create a measure like Product Type without sales&lt;/P&gt;&lt;P&gt;Used the expression =Count({$&amp;lt;Sales={"0"}&amp;gt;} distinct [Product_Type])&lt;/P&gt;&lt;P&gt;But it is not working ... I am getting '1' in all rows for the measure "Product Type without sales"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just FYI, the actual table will have rows at day level . I have just showed you the aggregated table. So here sales is sum(sales) so that if I pull the product_type dimension it do a group by&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anybody help me to solve this??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jan 2017 05:34:25 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-01-27T05:34:25Z</dc:date>
    <item>
      <title>sum values with condition measure based on a dimension</title>
      <link>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245142#M24820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Product_Type&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Sales&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Expected result : Product Type without sales&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Type1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;899&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Type2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;345&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Type3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Type4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;567&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Type5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;235&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Type6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;456&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Type7&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Type8&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;46&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Type9&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I have a table like above one (agg all the rows based on sales) I am trying to create a measure like Product Type without sales&lt;/P&gt;&lt;P&gt;Used the expression =Count({$&amp;lt;Sales={"0"}&amp;gt;} distinct [Product_Type])&lt;/P&gt;&lt;P&gt;But it is not working ... I am getting '1' in all rows for the measure "Product Type without sales"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just FYI, the actual table will have rows at day level . I have just showed you the aggregated table. So here sales is sum(sales) so that if I pull the product_type dimension it do a group by&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anybody help me to solve this??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2017 05:34:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245142#M24820</guid>
      <dc:creator />
      <dc:date>2017-01-27T05:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: sum values with condition measure based on a dimension</title>
      <link>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245143#M24821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count(DISTINCT {&amp;lt;sales = {"&amp;lt;=0"}&amp;gt;} producttype)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2017 05:50:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245143#M24821</guid>
      <dc:creator>sushil353</dc:creator>
      <dc:date>2017-01-27T05:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: sum values with condition measure based on a dimension</title>
      <link>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245144#M24822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not working ...&amp;nbsp; still showing all values as '1' . Just FYI, the actual table will have rows at day level . I have just showed you the aggregated table. So here sales is sum(sales) so that if I pull the product_type dimension it do a group by&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2017 06:01:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245144#M24822</guid>
      <dc:creator />
      <dc:date>2017-01-27T06:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: sum values with condition measure based on a dimension</title>
      <link>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245145#M24823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jithu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you are doing good!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can add another expression with following Definition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Product Type without Sales&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(AGGR(Sum(Sales), Product_Type)&amp;gt;0,0,1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2017 06:08:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245145#M24823</guid>
      <dc:creator>rahulpawarb</dc:creator>
      <dc:date>2017-01-27T06:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: sum values with condition measure based on a dimension</title>
      <link>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245146#M24824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use full accumulation option for below expression&lt;/P&gt;&lt;P&gt;count({&amp;lt;Sales={'0'}&amp;gt;} DISTINCT Product_Type)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="img.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/151011_img.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2017 06:21:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245146#M24824</guid>
      <dc:creator>sravanthialuval</dc:creator>
      <dc:date>2017-01-27T06:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: sum values with condition measure based on a dimension</title>
      <link>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245147#M24825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks This works as a dimension , But I want to create measure to count how many product_type has 0 values....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you help me create a measure.... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2017 06:57:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245147#M24825</guid>
      <dc:creator />
      <dc:date>2017-01-27T06:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: sum values with condition measure based on a dimension</title>
      <link>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245148#M24826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This will not work ... Please check the check that you have provided. If we have sales =0 then the value should be 1 else 0. I want to create measure to count how many product_type has 0 values....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2017 07:05:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245148#M24826</guid>
      <dc:creator />
      <dc:date>2017-01-27T07:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: sum values with condition measure based on a dimension</title>
      <link>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245149#M24827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jithu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is draft version of solution against your requirement (you can further refine it):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added a left join to the existing table to get the Sum of Sales at Product_Type level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LEFT JOIN&lt;/STRONG&gt;&lt;STRONG style="font-size: 10pt;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Product_Type,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(Sales) AS NewSales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident MyData&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GROUP BY Product_Type;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Post reloading data I have created a measure as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;count({&amp;lt;NewSales={0}&amp;gt;} Product_Type)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2017 12:22:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245149#M24827</guid>
      <dc:creator>rahulpawarb</dc:creator>
      <dc:date>2017-01-27T12:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: sum values with condition measure based on a dimension</title>
      <link>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245150#M24828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rahul,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As I told in the post that is aggregated table . Actual table consists date,product number also . So product number and type will be unique only for a day. One type can have many products. like that I have data for 5 months. out of that I want to how many products doesn't have sales by filtering a time period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thanks for the helping out.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Under Product Type&amp;nbsp; I have sub type and subsubtype too... I want to get this for all these three levels. Instead of indivial group by is there any other method group by all these Product Type,Product sub Type,Product sub sub Type at one shot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jithendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2017 04:51:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245150#M24828</guid>
      <dc:creator />
      <dc:date>2017-01-30T04:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: sum values with condition measure based on a dimension</title>
      <link>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245151#M24829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The relevance and accuracy of suggestions is proportional to the amount of information your provide. So more information about your requirements, data structure and some sample date would help. Best of all would be to upload a small sample QS qvf file with some representative sample data and details about the expected results (taking into account the extra fields that you have now added to the requirement).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2017 05:20:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245151#M24829</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-01-30T05:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: sum values with condition measure based on a dimension</title>
      <link>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245152#M24830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jithu,&lt;/P&gt;&lt;P&gt;I think that you should use something like &lt;STRONG&gt;sum(If(AGGR(Sum(Sales), Product_Type)&amp;gt;0,1,0))&lt;/STRONG&gt;. If you use this on a KPI object you should have the right value at least at Product Type level.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Guillermo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2017 13:01:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sum-values-with-condition-measure-based-on-a-dimension/m-p/1245152#M24830</guid>
      <dc:creator />
      <dc:date>2017-01-30T13:01:57Z</dc:date>
    </item>
  </channel>
</rss>

