<?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: Adding new data: Issues with expression and variable definition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758580#M1023913</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This expression contains 'naked fields' (ie without some sort of aggregation. See this article: &lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2014/06/16/use-the-aggregation-functions#comment-18036" title="http://community.qlik.com/blogs/qlikviewdesignblog/2014/06/16/use-the-aggregation-functions#comment-18036"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2014/06/16/use-the-aggregation-functions#comment-18036&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Mar 2015 15:01:27 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2015-03-23T15:01:27Z</dc:date>
    <item>
      <title>Adding new data: Issues with expression and variable definition</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758576#M1023909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am new to Qlikview and encountered some problems when I tried to add new data into the dashboard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My dashboard currently have only product data for 'A' and 'M'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently&lt;/P&gt;&lt;P&gt;My variable for the product is written as an expression:&lt;/P&gt;&lt;P&gt;vProduct:&lt;/P&gt;&lt;P&gt;=if(product='A', 'A', if(Product='M', 'M', if(GetSelectedCount(Product)=0, 0, if(GetSelectedCount(Product)&amp;gt;=2, 2))))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and a straight table is created with this expression:&lt;/P&gt;&lt;P&gt;=if(Product=vProduct, date(Date), if(vProduct=0 or vProduct=2, date(Date), null()))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything works OK until I tried adding &lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt;2 new product into the dashboard: 'E' and 'X' &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I tried modifying the vProduct definition to the following:&lt;/P&gt;&lt;P&gt;=if(Product='A', 'A', if(Product='M', 'M', if(Product='E', 'E', if(Product='X', 'X', if(GetSelectedCount(Model)=0, 0, if(GetSelectedCount(Model)=2, 2, &lt;SPAN style="font-size: 13.3333330154419px;"&gt;if(GetSelectedCount(Model)=3, 3, &lt;SPAN style="font-size: 13.3333330154419px;"&gt;if(GetSelectedCount(Model)=4, 4&lt;/SPAN&gt;&lt;/SPAN&gt;)))))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and modifying the straight table expression to the following:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;=if(Product=vProduct, date(Date), if(vProduct=0 or vProduct=2 or &lt;SPAN style="font-size: 13.3333330154419px;"&gt;vProduct=3 or &lt;SPAN style="font-size: 13.3333330154419px;"&gt;vProduct=2&lt;/SPAN&gt;&lt;/SPAN&gt;, date(Date), null()))))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I encountered a problem: When I select more than 2 products or 2 products, it returns results for all 4 product in the straight table. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Can someone help me please? Are there a&lt;SPAN style="font-size: 13.3333330154419px;"&gt;ny errors in the above expression that I have modified? &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 09:32:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758576#M1023909</guid>
      <dc:creator />
      <dc:date>2015-03-20T09:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Adding new data: Issues with expression and variable definition</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758577#M1023910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are you trying to show in your table first and foremost? When somebody selects an individual product, or a combination of any but all 4, you want it to show the date, otherwise don't show anything? And is that the expression or do you mean dimension?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 09:39:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758577#M1023910</guid>
      <dc:creator>morganaaron</dc:creator>
      <dc:date>2015-03-23T09:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Adding new data: Issues with expression and variable definition</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758578#M1023911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I am trying to show date of the selected product or selected products- whether the user has selected one product, 2 product, 3 product or all 4 product (i.e. "A", "M", "E" or "X"), show the selected products or product 's date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vProduct expression: &lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; text-decoration: underline;"&gt;=if(product='A', 'A', if(Product='M', 'M', if(GetSelectedCount(Product)=0, 0, if(GetSelectedCount(Product)&amp;gt;=2, 2))))))&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;is the definition of Variable: vProduct --&amp;gt; I found this in settings- variable overview&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the expression:&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; text-decoration: underline;"&gt;=if(Product=vProduct, date(Date), if(vProduct=0 or vProduct=2, date(Date), null()))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This is written as an dimension&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 09:54:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758578#M1023911</guid>
      <dc:creator />
      <dc:date>2015-03-23T09:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Adding new data: Issues with expression and variable definition</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758579#M1023912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I'm beginning to understand. Say your expression is to show sales, you only want to show sales that relate to the dates that the selected product(s) were sold on? If so, when selecting a product in a list box, it will naturally do this - limiting the data to your selections. If you want to show all sales (not just for the product but keeping to the dates that are attached) then there a few options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's just dealing with nulls that are your issue, there are various ways to combat it. Essentially I'm asking, why can't you just create a list box with the products in that would filter your table? Is there only one date attached to each product? Or are you simply trying to show a table with product and date?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 14:50:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758579#M1023912</guid>
      <dc:creator>morganaaron</dc:creator>
      <dc:date>2015-03-23T14:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Adding new data: Issues with expression and variable definition</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758580#M1023913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This expression contains 'naked fields' (ie without some sort of aggregation. See this article: &lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2014/06/16/use-the-aggregation-functions#comment-18036" title="http://community.qlik.com/blogs/qlikviewdesignblog/2014/06/16/use-the-aggregation-functions#comment-18036"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2014/06/16/use-the-aggregation-functions#comment-18036&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 15:01:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758580#M1023913</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-03-23T15:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Adding new data: Issues with expression and variable definition</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758581#M1023914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Florence,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you try below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vProduct:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=if(product='A', 'A', if(Product='M', 'M',&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if(product='E', 'E',&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if(product='X', 'X',&lt;/SPAN&gt;&lt;/SPAN&gt; if(GetSelectedCount(Product)=0, 0, if(GetSelectedCount(Product)&amp;gt;=4, 4))))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;and a straight table is created with this expression:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=if(Product=vProduct, date(Date), if(vProduct=0 or vProduct=4, date(Date), null()))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 15:06:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758581#M1023914</guid>
      <dc:creator>ashwanin</dc:creator>
      <dc:date>2015-03-23T15:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Adding new data: Issues with expression and variable definition</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758582#M1023915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;STRONG style="font-size: 11.6999998092651px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/ASHWANIN"&gt;ASHWANIN&lt;/A&gt;&lt;/STRONG&gt;, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still Doesnt work &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; &lt;/P&gt;&lt;P&gt;After entering the suggested expression, when i select the product individually, it shows data (same as the before) and when i select 2 or more than 2 product, the straight table shows no data&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 01:21:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758582#M1023915</guid>
      <dc:creator />
      <dc:date>2015-03-24T01:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: Adding new data: Issues with expression and variable definition</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758583#M1023916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried this method, but I dont seems to be able to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same thing happens. When I select 1 product. It filters well. When I select more than 1 product, it shows data for all products&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 01:35:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758583#M1023916</guid>
      <dc:creator />
      <dc:date>2015-03-24T01:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Adding new data: Issues with expression and variable definition</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758584#M1023917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Florence,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you upload your qvw? As Jonathan said, if you have multiple dates to show then you need some sort of aggregation function to pick one - otherwise it's going to return nothing as it doesn't know which date to pick. If you simply want to limit the range based on what you're selecting there are plenty of other less complicated ways to do so! If you have product as your dimension and Only(Date) as your expression (assuming there is only one date per product) this will show for whatever products or combination you then select. If there are multiple dates per product, you'll need to decide what you want to show - the max date, min date? If you want to show all dates that relate to any selected products, create a table box with product and date and it should show you all related dates.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 08:50:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758584#M1023917</guid>
      <dc:creator>morganaaron</dc:creator>
      <dc:date>2015-03-24T08:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Adding new data: Issues with expression and variable definition</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758585#M1023918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aaron,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;currently the Date (date) range expression is written as:=if(Date &amp;gt;=vMinSelectedDateNews and Date &amp;lt;=vMaxSelectedDateNews, Activity_News)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I need to write an expression to display the product or the product combination that is selected.&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;For example, if Product A is selected, Date (date) for Product A is displayed. If Product B and A is selected, the Date (date) for Product A and B is selected. If 3 products selected , for example, Product A, B, D etc, then Date (date ) for Product A, B and D will be displayed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 09:03:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758585#M1023918</guid>
      <dc:creator />
      <dc:date>2015-03-24T09:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding new data: Issues with expression and variable definition</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758586#M1023919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Florence,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's contained in the Activity_News field? Is that Date(date) a variable or a dimension? I think it's all going to revolve around the aggregation issue as Jonathan said.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 10:59:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-new-data-Issues-with-expression-and-variable-definition/m-p/758586#M1023919</guid>
      <dc:creator>morganaaron</dc:creator>
      <dc:date>2015-03-24T10:59:25Z</dc:date>
    </item>
  </channel>
</rss>

