<?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 Pivot with nested statement for holidays calendar in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Pivot-with-nested-statement-for-holidays-calendar/m-p/1836744#M69137</link>
    <description>&lt;P&gt;Dear all&lt;/P&gt;&lt;P&gt;I'm having some trouble with a pivot table.&lt;/P&gt;&lt;P&gt;This is the nested statement I created to sum all the working hours on timesheet registered during "holidays":&lt;/P&gt;&lt;P&gt;if((Day='1/1/2021' or Day='6/1/2021' or Day='19/3/2021' or Day='5/4/2021' or Day='1/5/2021' or Day='13/5/2021' or Day='24/5/2021' or Day='3/6/2021'&lt;BR /&gt;or Day='29/6/2021' or Day='1/8/2021' or Day='15/8/2021' or Day='1/11/2021' or Day='8/12/2021' or Day='25/12/2021' or Day='26/12/2021' or&lt;BR /&gt;Day='1/1/2022' or Day='6/1/2022' or Day='19/3/2022' or Day='18/4/2022' or Day='1/5/2022' or Day='26/5/2022' or Day='6/6/2022' or Day='16/6/2022'&lt;BR /&gt;or Day='29/6/2022' or Day='1/8/2022' or Day='15/8/2022' or Day='1/11/2022' or Day='8/12/2022' or Day='25/12/2022' or Day='26/12/2022'&lt;BR /&gt;or Weekday(Day)='Sun' or Weekday(Day)='Sat')&lt;BR /&gt;and ([Risorse.Company]='Arch SA' or [Risorse.Company]='SOURCE'),&lt;BR /&gt;(Sum(overtime)+Sum(travel)+Sum(night_shift)+Sum(internal)),Null())&lt;/P&gt;&lt;P&gt;If I paste this formula in a straight table I am able to see "holidays working hours" (worked during holidays). But if I try to create a pivot table to summarize weekly "holidays working hours" it doesn't work.&lt;/P&gt;&lt;P&gt;I tried Sum(Aggr(...), Employee)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;or&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sum(Aggr(...), Week(Day))&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;or&lt;/P&gt;&lt;P&gt;Sum(Total(...)&lt;/P&gt;&lt;P&gt;but nothing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Someone can help me please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Sep 2021 15:17:00 GMT</pubDate>
    <dc:creator>orlando162</dc:creator>
    <dc:date>2021-09-16T15:17:00Z</dc:date>
    <item>
      <title>Pivot with nested statement for holidays calendar</title>
      <link>https://community.qlik.com/t5/App-Development/Pivot-with-nested-statement-for-holidays-calendar/m-p/1836744#M69137</link>
      <description>&lt;P&gt;Dear all&lt;/P&gt;&lt;P&gt;I'm having some trouble with a pivot table.&lt;/P&gt;&lt;P&gt;This is the nested statement I created to sum all the working hours on timesheet registered during "holidays":&lt;/P&gt;&lt;P&gt;if((Day='1/1/2021' or Day='6/1/2021' or Day='19/3/2021' or Day='5/4/2021' or Day='1/5/2021' or Day='13/5/2021' or Day='24/5/2021' or Day='3/6/2021'&lt;BR /&gt;or Day='29/6/2021' or Day='1/8/2021' or Day='15/8/2021' or Day='1/11/2021' or Day='8/12/2021' or Day='25/12/2021' or Day='26/12/2021' or&lt;BR /&gt;Day='1/1/2022' or Day='6/1/2022' or Day='19/3/2022' or Day='18/4/2022' or Day='1/5/2022' or Day='26/5/2022' or Day='6/6/2022' or Day='16/6/2022'&lt;BR /&gt;or Day='29/6/2022' or Day='1/8/2022' or Day='15/8/2022' or Day='1/11/2022' or Day='8/12/2022' or Day='25/12/2022' or Day='26/12/2022'&lt;BR /&gt;or Weekday(Day)='Sun' or Weekday(Day)='Sat')&lt;BR /&gt;and ([Risorse.Company]='Arch SA' or [Risorse.Company]='SOURCE'),&lt;BR /&gt;(Sum(overtime)+Sum(travel)+Sum(night_shift)+Sum(internal)),Null())&lt;/P&gt;&lt;P&gt;If I paste this formula in a straight table I am able to see "holidays working hours" (worked during holidays). But if I try to create a pivot table to summarize weekly "holidays working hours" it doesn't work.&lt;/P&gt;&lt;P&gt;I tried Sum(Aggr(...), Employee)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;or&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sum(Aggr(...), Week(Day))&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;or&lt;/P&gt;&lt;P&gt;Sum(Total(...)&lt;/P&gt;&lt;P&gt;but nothing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Someone can help me please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Sep 2021 15:17:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pivot-with-nested-statement-for-holidays-calendar/m-p/1836744#M69137</guid>
      <dc:creator>orlando162</dc:creator>
      <dc:date>2021-09-16T15:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot with nested statement for holidays calendar</title>
      <link>https://community.qlik.com/t5/App-Development/Pivot-with-nested-statement-for-holidays-calendar/m-p/1837250#M69187</link>
      <description>&lt;P&gt;Hi, its probaly a data model issue but it's hard to say without loking at it, or at least a sample to make some tests.&lt;/P&gt;&lt;P&gt;BTW, instead of "&lt;SPAN&gt;Sum(Aggr(...), Week(Day))", create a Week field in script like "Week(Day) as Week" and use "Sum(Aggr(...), Week)". If you show different years maybe you need a WeekYearField "Week(Day)&amp;amp;'/'&amp;amp;Year(Day) as WeekYear".&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Sep 2021 08:42:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pivot-with-nested-statement-for-holidays-calendar/m-p/1837250#M69187</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2021-09-18T08:42:59Z</dc:date>
    </item>
  </channel>
</rss>

