<?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 if value included in a list in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/if-value-included-in-a-list/m-p/1839841#M69522</link>
    <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to find out if a specific value is included in a list. I tried with match function but something wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(match(DAY,HOLIDAYS)&lt;BR /&gt;and match(COMPANY,HOLIDAYS_COMPANY),&lt;BR /&gt;sum(timesheet)*1.5,&lt;BR /&gt;sum(timesheet) )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Someone can help me? I'm looking to find out if an employee has worked in an HOLIDAY (listed in a specific calendar of his own HOLIDAYS_COMPANY), to calculate timesheet to be compensated as overtime.&lt;/P&gt;&lt;P&gt;Please find attached a screenshot of my holidays calendar to be matched with timesheet data of employees.&lt;/P&gt;&lt;P&gt;Thank you,&lt;BR /&gt;Andrea&lt;/P&gt;</description>
    <pubDate>Tue, 28 Sep 2021 15:15:23 GMT</pubDate>
    <dc:creator>orlando162</dc:creator>
    <dc:date>2021-09-28T15:15:23Z</dc:date>
    <item>
      <title>if value included in a list</title>
      <link>https://community.qlik.com/t5/App-Development/if-value-included-in-a-list/m-p/1839841#M69522</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to find out if a specific value is included in a list. I tried with match function but something wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(match(DAY,HOLIDAYS)&lt;BR /&gt;and match(COMPANY,HOLIDAYS_COMPANY),&lt;BR /&gt;sum(timesheet)*1.5,&lt;BR /&gt;sum(timesheet) )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Someone can help me? I'm looking to find out if an employee has worked in an HOLIDAY (listed in a specific calendar of his own HOLIDAYS_COMPANY), to calculate timesheet to be compensated as overtime.&lt;/P&gt;&lt;P&gt;Please find attached a screenshot of my holidays calendar to be matched with timesheet data of employees.&lt;/P&gt;&lt;P&gt;Thank you,&lt;BR /&gt;Andrea&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 15:15:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/if-value-included-in-a-list/m-p/1839841#M69522</guid>
      <dc:creator>orlando162</dc:creator>
      <dc:date>2021-09-28T15:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: if value included in a list</title>
      <link>https://community.qlik.com/t5/App-Development/if-value-included-in-a-list/m-p/1839852#M69523</link>
      <description>&lt;P&gt;Assuming you have a daily timesheet table with date, employee, hours ...&lt;/P&gt;&lt;P&gt;And your Holiday table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use applymap to create a flag/weighted salary metric to use in your calculation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;holiday_weight:&lt;/P&gt;&lt;P&gt;mapping load distinct&lt;/P&gt;&lt;P&gt;Holiday&lt;/P&gt;&lt;P&gt;,1.5&lt;/P&gt;&lt;P&gt;resident [holiday table]&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;timesheet_data:&lt;/P&gt;&lt;P&gt;load *&lt;/P&gt;&lt;P&gt;,applymap('holiday_weight', [timesheet date], 1) as holiday_weight&lt;/P&gt;&lt;P&gt;from/resident [timesheet data table];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now your calculation in the front end can be&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sum([hours] * [holiday_weight])&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 16:08:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/if-value-included-in-a-list/m-p/1839852#M69523</guid>
      <dc:creator>stevejoyce</dc:creator>
      <dc:date>2021-09-28T16:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: if value included in a list</title>
      <link>https://community.qlik.com/t5/App-Development/if-value-included-in-a-list/m-p/1839855#M69524</link>
      <description>&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;Could work, but how to make double check for holiday calendar and company? Every company has its own holiday calendar.. I thought match was easier but maybe applymap is better&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 16:18:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/if-value-included-in-a-list/m-p/1839855#M69524</guid>
      <dc:creator>orlando162</dc:creator>
      <dc:date>2021-09-28T16:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: if value included in a list</title>
      <link>https://community.qlik.com/t5/App-Development/if-value-included-in-a-list/m-p/1839862#M69526</link>
      <description>&lt;P&gt;Match returns where a searched value is in a list, that isn't going to help if you are looking in another table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So you have 1 holiday table for all companies, and i assume a Company field in your holiday table?&lt;/P&gt;&lt;P&gt;You can create a composite key of date &amp;amp; company that is used in your apply map.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 16:58:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/if-value-included-in-a-list/m-p/1839862#M69526</guid>
      <dc:creator>stevejoyce</dc:creator>
      <dc:date>2021-09-28T16:58:19Z</dc:date>
    </item>
  </channel>
</rss>

