<?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 Using frequency to develop a counter in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168920#M39906</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you have been a great help, thank you very much.&lt;/P&gt;&lt;P&gt;Before I get into working with dates, I simply want to look at my entire data set and return the % of customers that have made multiple orders vs. % of customers that have made 1 order (current vs. new).&lt;/P&gt;&lt;P&gt;I am able to display if they are a current or new customer in a list box with&lt;/P&gt;&lt;P&gt;count (if ([SAP order #] &amp;lt;= 1), newcustomer)&lt;/P&gt;&lt;P&gt;and the opposite for current.&lt;/P&gt;&lt;P&gt;What I can figure out how to do is to get the expression to just give me the total "count" from that if statement.&lt;/P&gt;&lt;P&gt;The idea being is I can show customer data if they are a new v/s current, but also show a graph or a number (percentage) of new vs. current. I understand the bottom half (divide by) of the formula count distinct sap order # , it is just top that I can't seem to understand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Nov 2010 18:57:39 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-11-02T18:57:39Z</dc:date>
    <item>
      <title>Using frequency to develop a counter</title>
      <link>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168914#M39900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am just starting into using qlikview so please excuse any "dumb questions". I am very comfortable with displaying the data etc. but calculations are causing me issues. Basically I am trying to develop a report that will show the % of business that comes from current customers vs. new customers. I can display all the info I want but I can't seem to figure out how to get this percentage to work.&lt;/P&gt;&lt;P&gt;The data I have is a table of order information. What I am doing is looking at their customer number and if the frequency is &amp;gt; 1 then they are a current customer, if it is &amp;lt;1 they are a new customer. eventually i want to build in timeframe around fiscal year but for now I can't figure out how to do the calculation to get the percentages. Then the display will either go to a graph or a data box .. doesnt' really matter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for the help in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Nov 2010 14:45:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168914#M39900</guid>
      <dc:creator />
      <dc:date>2010-11-02T14:45:55Z</dc:date>
    </item>
    <item>
      <title>Using frequency to develop a counter</title>
      <link>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168915#M39901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class="ForumPostBody"&gt;&lt;P&gt;I might not be understanding something, but would the following work?&lt;/P&gt;&lt;P&gt;count(if(Customer&amp;lt;1,Customer))&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;count(if(Customer&amp;gt;1,Customer))&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;DIV style="clear:both;"&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Nov 2010 14:59:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168915#M39901</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2010-11-02T14:59:35Z</dc:date>
    </item>
    <item>
      <title>Using frequency to develop a counter</title>
      <link>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168916#M39902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hmm I might be doing something wrong but that didn't exactly work.. So maybe more info would help.&lt;/P&gt;&lt;P&gt;I have this type of data&lt;/P&gt;&lt;P&gt;customer # , name, address, etc..&lt;/P&gt;&lt;P&gt;Since some of the names are entered differently I am relying on the customer # to be the unique identifier. So I created a table that shows all the numbers and their frequency.&lt;/P&gt;&lt;P&gt;my thoughts were like this&lt;/P&gt;&lt;P&gt;if (customer# frequency &amp;gt; 1 ) current customer + 1&lt;/P&gt;&lt;P&gt;else new customer +1&lt;/P&gt;&lt;P&gt;then display:&lt;/P&gt;&lt;P&gt;(current customer / total customer)*100&lt;/P&gt;&lt;P&gt;(new customer / total customer ) * 100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;does the count function take care of this or should I be using aggr or something else?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Nov 2010 15:25:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168916#M39902</guid>
      <dc:creator />
      <dc:date>2010-11-02T15:25:01Z</dc:date>
    </item>
    <item>
      <title>Using frequency to develop a counter</title>
      <link>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168917#M39903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The count(if) should work.&lt;/P&gt;&lt;P&gt;count(if(Customer_Frequency&amp;lt;1,CustomerNo))&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;count(CustomerNo)&lt;/P&gt;&lt;P&gt;If the frequency is calculated in a table this will problably work for the current month, but to do analysis for every month, you could use the customer first purchase date. You can play with a formula like this:&lt;/P&gt;&lt;P&gt;count(aggr(if(monthname(min(total Order_Date))=Month_Year,CustomerNo,null()),CustomerNo))&lt;/P&gt;&lt;P&gt;Month_Year is a field you create in your script using the monthname() function and you use in the dimension of the chart.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Edit: A total modifier is also probably going to be necessary.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Nov 2010 15:51:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168917#M39903</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2010-11-02T15:51:53Z</dc:date>
    </item>
    <item>
      <title>Using frequency to develop a counter</title>
      <link>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168918#M39904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I realized the problem and it is all about my approach. I was thinking I could use the frequency that the list box automatically calculates, but I need to do that myself as part of the script.. correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Nov 2010 17:17:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168918#M39904</guid>
      <dc:creator />
      <dc:date>2010-11-02T17:17:10Z</dc:date>
    </item>
    <item>
      <title>Using frequency to develop a counter</title>
      <link>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168919#M39905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The frequency in the list box is basically a count of the values in that field, but you won't be able to use it to determine a new customer just like that. You can either use a first_date_purchased field or compare if the client had bought something in a past period compared to the current period. For the last option, you can use set analysis having the user select a certain month:&lt;/P&gt;&lt;P&gt;count({$&amp;lt;CustomerNo = E({$&amp;lt;Order_Date={"&amp;lt;=$(=date(max(Month_Year)))"}&amp;gt;})&amp;gt;} CustomerNo)&lt;/P&gt;&lt;P&gt;The E() exlcludes all customers with a Order Date before the Month Year selected by the user which will give you a count of the new customers of the period selected.&lt;/P&gt;&lt;P&gt;These functions aren't tested, but hopefully give you an idea in what direction to go. If you have a more specific question about syntax once you've started playing with your real data just post again.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Nov 2010 18:26:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168919#M39905</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2010-11-02T18:26:31Z</dc:date>
    </item>
    <item>
      <title>Using frequency to develop a counter</title>
      <link>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168920#M39906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you have been a great help, thank you very much.&lt;/P&gt;&lt;P&gt;Before I get into working with dates, I simply want to look at my entire data set and return the % of customers that have made multiple orders vs. % of customers that have made 1 order (current vs. new).&lt;/P&gt;&lt;P&gt;I am able to display if they are a current or new customer in a list box with&lt;/P&gt;&lt;P&gt;count (if ([SAP order #] &amp;lt;= 1), newcustomer)&lt;/P&gt;&lt;P&gt;and the opposite for current.&lt;/P&gt;&lt;P&gt;What I can figure out how to do is to get the expression to just give me the total "count" from that if statement.&lt;/P&gt;&lt;P&gt;The idea being is I can show customer data if they are a new v/s current, but also show a graph or a number (percentage) of new vs. current. I understand the bottom half (divide by) of the formula count distinct sap order # , it is just top that I can't seem to understand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Nov 2010 18:57:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168920#M39906</guid>
      <dc:creator />
      <dc:date>2010-11-02T18:57:39Z</dc:date>
    </item>
    <item>
      <title>Using frequency to develop a counter</title>
      <link>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168921#M39907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suppose there might be customers without any order so a count(distinct customer) might return percents that don't add up to 100% so it might be better to just sum the two count(if)'s like below in the expression of a chart:&lt;/P&gt;&lt;P style="margin:0px;"&gt;count(distinct if([SAP order #]&amp;lt;=1,customer))&lt;/P&gt;&lt;P style="margin:0px;"&gt;/&lt;/P&gt;&lt;P style="margin:0px;"&gt;count(distinct if([SAP order #]&amp;gt;0,customer))&lt;/P&gt;&lt;P style="margin:0px;"&gt;&lt;/P&gt;&lt;P style="margin:0px;"&gt;&lt;/P&gt;&lt;P style="margin:0px;"&gt;Note that the example that you put in your post shouldn't have a ) after &amp;lt;= 1, but two ) after newcustomer like the examples I've included.&lt;/P&gt;&lt;P style="margin:0px;"&gt;&lt;/P&gt;&lt;P style="margin:0px;"&gt;Does that work, or am I missing something?&lt;/P&gt;&lt;PRE style="margin:0px;"&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Nov 2010 19:15:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168921#M39907</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2010-11-02T19:15:17Z</dc:date>
    </item>
    <item>
      <title>Using frequency to develop a counter</title>
      <link>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168922#M39908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If i do count distinct [SAP order #] that works and returns a value,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when I do this: count (distinct if ( [SAP Account #]&amp;lt;=1, [Bill To Name]))&lt;/P&gt;&lt;P&gt;I get no result back.&lt;/P&gt;&lt;P&gt;&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>Tue, 02 Nov 2010 21:42:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168922#M39908</guid>
      <dc:creator />
      <dc:date>2010-11-02T21:42:02Z</dc:date>
    </item>
    <item>
      <title>Using frequency to develop a counter</title>
      <link>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168923#M39909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The syntax looks fine. Does the field [SAP Account #] have values equal to or less than 1 that correspond to [Bill To Name]?&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2010 20:44:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-frequency-to-develop-a-counter/m-p/168923#M39909</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2010-11-03T20:44:23Z</dc:date>
    </item>
  </channel>
</rss>

