<?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 macro stdev in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/macro-stdev/m-p/152288#M29778</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to calculate the stdev of the number of sales each day in a window of 30 days,&lt;/P&gt;&lt;P&gt;the problem is that i don't have data in all the days, if I use stdev function only uses the values I have but I need to count always 30 values,&lt;/P&gt;&lt;P&gt;if I don't have a value in a date I need a zero,&lt;/P&gt;&lt;P&gt;any idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Jan 2011 11:52:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-01-04T11:52:29Z</dc:date>
    <item>
      <title>macro stdev</title>
      <link>https://community.qlik.com/t5/QlikView/macro-stdev/m-p/152286#M29776</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 a macro to calculate the standard deviation,&lt;/P&gt;&lt;P&gt;Do you have it? the stdev function doesn't work correctly with my dataset&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jan 2011 10:15:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro-stdev/m-p/152286#M29776</guid>
      <dc:creator />
      <dc:date>2011-01-04T10:15:38Z</dc:date>
    </item>
    <item>
      <title>macro stdev</title>
      <link>https://community.qlik.com/t5/QlikView/macro-stdev/m-p/152287#M29777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;QV normally discourages the use of macro. if your calculation is different from stddev function, why can't we try it from the other standard functions available ? can you explain the logic of your calculation?&lt;/P&gt;&lt;P&gt;regards, tresesco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jan 2011 11:28:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro-stdev/m-p/152287#M29777</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2011-01-04T11:28:57Z</dc:date>
    </item>
    <item>
      <title>macro stdev</title>
      <link>https://community.qlik.com/t5/QlikView/macro-stdev/m-p/152288#M29778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to calculate the stdev of the number of sales each day in a window of 30 days,&lt;/P&gt;&lt;P&gt;the problem is that i don't have data in all the days, if I use stdev function only uses the values I have but I need to count always 30 values,&lt;/P&gt;&lt;P&gt;if I don't have a value in a date I need a zero,&lt;/P&gt;&lt;P&gt;any idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jan 2011 11:52:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro-stdev/m-p/152288#M29778</guid>
      <dc:creator />
      <dc:date>2011-01-04T11:52:29Z</dc:date>
    </item>
    <item>
      <title>macro stdev</title>
      <link>https://community.qlik.com/t5/QlikView/macro-stdev/m-p/152289#M29779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If we consider the standard deviation formula as a layman, then it is: SQRT(Sum((x-avg(x))^2) /N). Now you are having issue with the count part, i.e N (Total count of frequency). Let calculate this formula for your own. if N is fixed to 30, replace N with it or so. Note: here 'x' is your amount to be calculated.&lt;/P&gt;&lt;P&gt;Or, even you can go for putting 0 in the SalesAmount at the backend for those transaction when there is no transaction against some days.(possibly for that you have to maintain a common calendar).&lt;/P&gt;&lt;P&gt;hope this would help you.&lt;/P&gt;&lt;P&gt;regards, tresesco&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jan 2011 12:34:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro-stdev/m-p/152289#M29779</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2011-01-04T12:34:21Z</dc:date>
    </item>
    <item>
      <title>macro stdev</title>
      <link>https://community.qlik.com/t5/QlikView/macro-stdev/m-p/152290#M29780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you but I can use that formula,&lt;/P&gt;&lt;P&gt;here is an example to explain it:&lt;/P&gt;&lt;P&gt;giving 3 values: 1, 1, 2, avg=1.3&lt;/P&gt;&lt;P&gt;if i use Sum((x-avg(x))^2) the result is (4-1.3)^2 instead of (1-1.3)^2+(1-1.3)^2+(2-1.3)^2,&lt;/P&gt;&lt;P&gt;(I know that in this case I could use stdev function but I don't tend to have that kind of cases)&lt;/P&gt;&lt;P&gt;i don't know if there is any way to use that formula propperly,&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jan 2011 09:30:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro-stdev/m-p/152290#M29780</guid>
      <dc:creator />
      <dc:date>2011-01-05T09:30:17Z</dc:date>
    </item>
    <item>
      <title>macro stdev</title>
      <link>https://community.qlik.com/t5/QlikView/macro-stdev/m-p/152291#M29781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;use this formula :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SQRT(Sum((Value- avg(Total Value))*(Value-avg(Total Value)))/(N-1)) , Where N= total frequency. you can use N also or 30 according to your need. N-1 is used in STDEV function.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Have a look at the attachment. even i am happy to find the solution in practice. hope this would help you.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sorry, there is some issues in my system, i am not being able to upload the app file now. try with the formula, it is enough itself i believe. if there is further issue, i wd try to upload next day.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;regards, tresesco&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jan 2011 13:00:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro-stdev/m-p/152291#M29781</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2011-01-05T13:00:09Z</dc:date>
    </item>
    <item>
      <title>macro stdev</title>
      <link>https://community.qlik.com/t5/QlikView/macro-stdev/m-p/152292#M29782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Tresesco!&lt;/P&gt;&lt;P&gt;I've realised what i was doing wrong, I'm working with complex aggregations and I made a mistake, now it works perfecty&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jan 2011 16:02:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro-stdev/m-p/152292#M29782</guid>
      <dc:creator />
      <dc:date>2011-01-05T16:02:26Z</dc:date>
    </item>
  </channel>
</rss>

