<?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: Add condition to if match in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Add-condition-to-if-match/m-p/1664106#M728915</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I would suggest you to move this if calculation to script as cal calculated dimension can cause performance issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LOAD*,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(match(TYPE,'2041','2500','4000','2044','2040','3000','4990','3070','3090','2598') ,'2,000',if(match(TYPE,'1010') ,'0','1,000')) as &lt;STRONG&gt;TypeNew&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Now your can use the simplify version of calculated dimension.&lt;/P&gt;&lt;P&gt;=aggr(only({&amp;lt;Year={"$(=year(today()))"},Month={"$(=month(today()))"}&amp;gt;}&lt;SPAN&gt;&lt;STRONG&gt;TypeNew&lt;/STRONG&gt;&lt;/SPAN&gt;) ,&lt;SPAN&gt;&lt;STRONG&gt;TypeNew&lt;/STRONG&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you further want to improve the expression, you can create a Flag for current year and current month condition is script&lt;/P&gt;&lt;P&gt;=if(year=year(today()) and month =month(today()),1,0) as Flag&lt;/P&gt;&lt;P&gt;Then instead of calculated dimension you can use the Flag in &lt;STRONG&gt;Expression&lt;/STRONG&gt; set analysis with dimension&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;TypeNew&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jan 2020 13:50:28 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2020-01-09T13:50:28Z</dc:date>
    <item>
      <title>Add condition to if match</title>
      <link>https://community.qlik.com/t5/QlikView/Add-condition-to-if-match/m-p/1664095#M728914</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have the following calculate dimension:&lt;/P&gt;&lt;P&gt;=if(match(TYPE,'2041','2500','4000','2044','2040','3000','4990','3070','3090','2598') ,'2,000',if(match(TYPE,'1010') ,'0','1,000'))&lt;/P&gt;&lt;P&gt;this dimension display all the types from all the years, how can I added two condiotions to the calculation::&lt;/P&gt;&lt;P&gt;Year=year(Today())&lt;/P&gt;&lt;P&gt;month=Month(Today())&lt;/P&gt;&lt;P&gt;so the types that will be displayed are the types for current year and month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-condition-to-if-match/m-p/1664095#M728914</guid>
      <dc:creator>bellesol</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Add condition to if match</title>
      <link>https://community.qlik.com/t5/QlikView/Add-condition-to-if-match/m-p/1664106#M728915</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I would suggest you to move this if calculation to script as cal calculated dimension can cause performance issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LOAD*,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(match(TYPE,'2041','2500','4000','2044','2040','3000','4990','3070','3090','2598') ,'2,000',if(match(TYPE,'1010') ,'0','1,000')) as &lt;STRONG&gt;TypeNew&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Now your can use the simplify version of calculated dimension.&lt;/P&gt;&lt;P&gt;=aggr(only({&amp;lt;Year={"$(=year(today()))"},Month={"$(=month(today()))"}&amp;gt;}&lt;SPAN&gt;&lt;STRONG&gt;TypeNew&lt;/STRONG&gt;&lt;/SPAN&gt;) ,&lt;SPAN&gt;&lt;STRONG&gt;TypeNew&lt;/STRONG&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you further want to improve the expression, you can create a Flag for current year and current month condition is script&lt;/P&gt;&lt;P&gt;=if(year=year(today()) and month =month(today()),1,0) as Flag&lt;/P&gt;&lt;P&gt;Then instead of calculated dimension you can use the Flag in &lt;STRONG&gt;Expression&lt;/STRONG&gt; set analysis with dimension&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;TypeNew&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 13:50:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-condition-to-if-match/m-p/1664106#M728915</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-01-09T13:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: Add condition to if match</title>
      <link>https://community.qlik.com/t5/QlikView/Add-condition-to-if-match/m-p/1664217#M728916</link>
      <description>&lt;P&gt;Thanks, it worked!&lt;/P&gt;&lt;P&gt;I'm sorry for the basic questions,&lt;/P&gt;&lt;P&gt;why did you use aggr? and why did you use the sign "$" in the set analysis?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 19:26:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-condition-to-if-match/m-p/1664217#M728916</guid>
      <dc:creator>bellesol</dc:creator>
      <dc:date>2020-01-09T19:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Add condition to if match</title>
      <link>https://community.qlik.com/t5/QlikView/Add-condition-to-if-match/m-p/1664225#M728918</link>
      <description>&lt;P&gt;I would recommend you to read this blogs&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/The-Magic-of-Dollar-Expansions/ba-p/1471979" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/The-Magic-of-Dollar-Expansions/ba-p/1471979&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Calculated-Dimensions/ba-p/1472813" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/Calculated-Dimensions/ba-p/1472813&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 20:00:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-condition-to-if-match/m-p/1664225#M728918</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-01-09T20:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Add condition to if match</title>
      <link>https://community.qlik.com/t5/QlikView/Add-condition-to-if-match/m-p/1664233#M728919</link>
      <description>&lt;P&gt;Also please don't forget to mark the reply as correct&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 20:32:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-condition-to-if-match/m-p/1664233#M728919</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-01-09T20:32:30Z</dc:date>
    </item>
  </channel>
</rss>

