<?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 Calculated expression in a table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-expression-in-a-table/m-p/2120446#M1224585</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;I have an issue with "filtering" my market dimension with trim.&lt;/P&gt;
&lt;P&gt;This is the current code that works, it is an expression in a table:&lt;/P&gt;
&lt;P&gt;sum(if(ANNO_TBL=Anno_Exp and DATA&amp;lt;=Mese_Pari_Data AND TRIM(MARKET_2)='660' ,$(vQtFatturato)))&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ricenoodles_0-1695215131435.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/116665i05224B12CC399A09/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ricenoodles_0-1695215131435.png" alt="ricenoodles_0-1695215131435.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;My market dimension has all the markets that my company sells to. Let's say that i need to see just 2 or 3 markets, not 1 or all of them, but every time I try adding another market, it doesn't work. What is the correct way to write this? I am not familiar with this and so far I have only worked with code written by other people.&lt;/P&gt;
&lt;P&gt;I've tried:&lt;/P&gt;
&lt;P&gt;A.&amp;nbsp; sum(if(ANNO_TBL=Anno_Exp and DATA&amp;lt;=Mese_Pari_Data AND TRIM(MARKET_2)='660' AND TRIM(MARKET_2)='36' ,$(vQtFatturato)))&lt;/P&gt;
&lt;P&gt;B.&amp;nbsp; sum(if(ANNO_TBL=Anno_Exp and DATA&amp;lt;=Mese_Pari_Data AND TRIM(MARKET_2)='660' OR TRIM(MARKET_2)='36' ,$(vQtFatturato)))&lt;/P&gt;
&lt;P&gt;Basically I need to show to every seller, only their markets ex. Bob sells to the UK, Brazil and Norway, so he sees a table of only his markets.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks is advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Sep 2023 13:11:26 GMT</pubDate>
    <dc:creator>ricenoodles</dc:creator>
    <dc:date>2023-09-20T13:11:26Z</dc:date>
    <item>
      <title>Calculated expression in a table</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-expression-in-a-table/m-p/2120446#M1224585</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;I have an issue with "filtering" my market dimension with trim.&lt;/P&gt;
&lt;P&gt;This is the current code that works, it is an expression in a table:&lt;/P&gt;
&lt;P&gt;sum(if(ANNO_TBL=Anno_Exp and DATA&amp;lt;=Mese_Pari_Data AND TRIM(MARKET_2)='660' ,$(vQtFatturato)))&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ricenoodles_0-1695215131435.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/116665i05224B12CC399A09/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ricenoodles_0-1695215131435.png" alt="ricenoodles_0-1695215131435.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;My market dimension has all the markets that my company sells to. Let's say that i need to see just 2 or 3 markets, not 1 or all of them, but every time I try adding another market, it doesn't work. What is the correct way to write this? I am not familiar with this and so far I have only worked with code written by other people.&lt;/P&gt;
&lt;P&gt;I've tried:&lt;/P&gt;
&lt;P&gt;A.&amp;nbsp; sum(if(ANNO_TBL=Anno_Exp and DATA&amp;lt;=Mese_Pari_Data AND TRIM(MARKET_2)='660' AND TRIM(MARKET_2)='36' ,$(vQtFatturato)))&lt;/P&gt;
&lt;P&gt;B.&amp;nbsp; sum(if(ANNO_TBL=Anno_Exp and DATA&amp;lt;=Mese_Pari_Data AND TRIM(MARKET_2)='660' OR TRIM(MARKET_2)='36' ,$(vQtFatturato)))&lt;/P&gt;
&lt;P&gt;Basically I need to show to every seller, only their markets ex. Bob sells to the UK, Brazil and Norway, so he sees a table of only his markets.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks is advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 13:11:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-expression-in-a-table/m-p/2120446#M1224585</guid>
      <dc:creator>ricenoodles</dc:creator>
      <dc:date>2023-09-20T13:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated expression in a table</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-expression-in-a-table/m-p/2120457#M1224586</link>
      <description>&lt;P&gt;try:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;sum(if(ANNO_TBL=Anno_Exp and DATA&amp;lt;=Mese_Pari_Data AND Match(TRIM(MARKET_2)='660' ,'36') ,$(vQtFatturato)))&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 Sep 2023 13:23:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-expression-in-a-table/m-p/2120457#M1224586</guid>
      <dc:creator>Cascader</dc:creator>
      <dc:date>2023-09-20T13:23:10Z</dc:date>
    </item>
  </channel>
</rss>

