<?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 Re: Set analysis formula not working in pivot table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-analysis-formula-not-working-in-pivot-table/m-p/1557975#M62910</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I found the solution :&lt;/P&gt;&lt;P&gt;Sum(total{$&amp;lt;Annee = {"$(=Year(Today()))"}, Mois = {"$(=Num(Month(Today())))"}&amp;gt;}openDays)&lt;/P&gt;&lt;P&gt;Have a nice day everyone &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Mar 2019 14:52:38 GMT</pubDate>
    <dc:creator>Ed</dc:creator>
    <dc:date>2019-03-18T14:52:38Z</dc:date>
    <item>
      <title>Set analysis formula not working in pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-formula-not-working-in-pivot-table/m-p/1557231#M62906</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to create a pivot table with a measure in line and a hierarchy dimension in column but the value returned when the conditions are completed are just Sum(Sales). Here is my set analysis formula :&lt;/P&gt;&lt;P&gt;if(Annee = Year(Today()),if( Mois = Num(Month(Today())),&lt;BR /&gt;(&lt;BR /&gt;Sum({$&amp;lt;Annee = {"$(=Year(Today()))"}, Mois = {"$(=Num(Month(Today())))"}&amp;gt;}Sales)&lt;BR /&gt;*Sum({1&amp;lt;Annee = {"$(=Year(Today()))"}, Mois = {"$(=Num(Month(Today())))"}&amp;gt;}openDays)&lt;BR /&gt;/Sum({$&amp;lt;date_jour = {"&amp;gt;=$(=monthstart(Today()))&amp;lt;=$(=max({$&amp;lt;Sales-={'0'}&amp;gt;}date_jour))"}&amp;gt; }openDays)&lt;BR /&gt;)&lt;BR /&gt;,sum(Sales))&lt;BR /&gt;,sum(Sales))&lt;/P&gt;&lt;P&gt;Do you have an idea how to fix this ?&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 07:51:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-formula-not-working-in-pivot-table/m-p/1557231#M62906</guid>
      <dc:creator>Ed</dc:creator>
      <dc:date>2021-04-02T07:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis formula not working in pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-formula-not-working-in-pivot-table/m-p/1557674#M62907</link>
      <description>&lt;P&gt;That is expected from your formula because the following part is probably evaluated to "1".&lt;BR /&gt;Both probably evaluating to the number of open days in current month.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sum({1&amp;lt;Annee = {"$(=Year(Today()))"}, Mois = {"$(=Num(Month(Today())))"}&amp;gt;}openDays)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/Sum({$&amp;lt;date_jour = {"&amp;gt;=$(=monthstart(Today()))&amp;lt;=$(=max({$&amp;lt;Sales-={'0'}&amp;gt;}date_jour))"}&amp;gt; }openDays)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You expect this to yield different values per table cell?&lt;BR /&gt;Not so as the set analysis is evaluated once on the data model before traversing the table cells.&lt;BR /&gt;Dimensions in table does not influence the set analysis.&lt;BR /&gt;After that the dimensions are applied to the resulting data model output from the set analysis.&lt;BR /&gt;Common mistake of people beginning with set analysis to think it will yield different results depending on table dimensions.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 08:35:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-formula-not-working-in-pivot-table/m-p/1557674#M62907</guid>
      <dc:creator>Anders_Eriksson</dc:creator>
      <dc:date>2019-03-18T08:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis formula not working in pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-formula-not-working-in-pivot-table/m-p/1557791#M62908</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for your response. Yes I expected this to yield different values per table cell, because my formula is giving the good value when I use the KPI visulazation and the pivot table filters, on the hierarchy dimension, the Sum(Sales) formula which is a set analysis function also.&lt;/P&gt;&lt;P&gt;My goal here is to display the Sum(sales) for all the periods before today month and year and for the current value of Sales do a basic calcul which is :&lt;/P&gt;&lt;P&gt;Sum(Sales)*(open days in the current month ofthe current year) /(the open days allready past)&lt;BR /&gt;filtered on a hierachy dimension in a pivot table&lt;/P&gt;&lt;P&gt;There isn't any way to show that ?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 10:37:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-formula-not-working-in-pivot-table/m-p/1557791#M62908</guid>
      <dc:creator>Ed</dc:creator>
      <dc:date>2019-03-18T10:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis formula not working in pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-formula-not-working-in-pivot-table/m-p/1557932#M62909</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It appears, indeed, that the following formula doesn't display the right value.&lt;BR /&gt;Sum({1&amp;lt;Annee = {"$(=Year(Today()))"}, Mois = {"$(=Num(Month(Today())))"}&amp;gt;}openDays)&lt;/P&gt;&lt;P&gt;It gives 6 just like this formula&amp;nbsp;(my current number of opendays) :&lt;BR /&gt;Sum({$&amp;lt;date_jour = {"&amp;gt;=$(=monthstart(Today()))&amp;lt;=$(=max({$&amp;lt;Sales-={'0'}&amp;gt;}date_jour))"}&amp;gt; }openDays)&lt;/P&gt;&lt;P&gt;instead of 21 the number of days on the month. Can't I use an aggregate function or something else to make it work in the pivot table ?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 13:53:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-formula-not-working-in-pivot-table/m-p/1557932#M62909</guid>
      <dc:creator>Ed</dc:creator>
      <dc:date>2019-03-18T13:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis formula not working in pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-formula-not-working-in-pivot-table/m-p/1557975#M62910</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I found the solution :&lt;/P&gt;&lt;P&gt;Sum(total{$&amp;lt;Annee = {"$(=Year(Today()))"}, Mois = {"$(=Num(Month(Today())))"}&amp;gt;}openDays)&lt;/P&gt;&lt;P&gt;Have a nice day everyone &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 14:52:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-formula-not-working-in-pivot-table/m-p/1557975#M62910</guid>
      <dc:creator>Ed</dc:creator>
      <dc:date>2019-03-18T14:52:38Z</dc:date>
    </item>
  </channel>
</rss>

