<?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: Expression built from selections in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-built-from-selections/m-p/765361#M272042</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for your patience with me!&amp;nbsp; I am afraid that even though I have been working with the program for several years, I have only just started doing things other than the basics recently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This worked like a charm, once I understood what you were saying!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Feb 2015 14:01:31 GMT</pubDate>
    <dc:creator>raynac</dc:creator>
    <dc:date>2015-02-23T14:01:31Z</dc:date>
    <item>
      <title>Expression built from selections</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-built-from-selections/m-p/765355#M272036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I built a hardcoded _Dimension and need to use it to create a summary in a chart.&amp;nbsp; I want to allow my clients to choose which revenue elements to include in their summary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the expression I built, but it's not working.&amp;nbsp; If I select more than one item, I get "No Data To Display".&amp;nbsp; Can anyone tell me what I might be doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(_Dimension='Activity', Sum ([Room Night ActivityRev]),0) + &lt;/P&gt;&lt;P&gt;if(_Dimension='Other Charge', Sum ([Room Night OtherChargeRev]),0) +&lt;/P&gt;&lt;P&gt;if(_Dimension='Shuttle', Sum ([Room Night ShuttleRev]),0) +&lt;/P&gt;&lt;P&gt;if(_Dimension='Spa', Sum ([Room Night SpaRev]),0) +&lt;/P&gt;&lt;P&gt;if(_Dimension='Package', Sum ([Room Night PkgRev]),0) +&lt;/P&gt;&lt;P&gt;if(_Dimension='Facility', Sum ([Room Night FacilityRev]),0) +&lt;/P&gt;&lt;P&gt;if(_Dimension='Alternate Inventory', Sum ([Room Night AltInvRev]),0) +&lt;/P&gt;&lt;P&gt;if(_Dimension='Other', Sum ([Room Night OtherRev]),0) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for any help you can give!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 20:42:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-built-from-selections/m-p/765355#M272036</guid>
      <dc:creator>raynac</dc:creator>
      <dc:date>2015-02-20T20:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: Expression built from selections</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-built-from-selections/m-p/765356#M272037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because if there is more than one value is selected/available, you cannot say if the condition in if() is true or false.&amp;nbsp; Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension),'*Activity*'), Sum ([Room Night ActivityRev]),0) + &lt;BR /&gt;if(wildmatch(GetFieldSelections(_Dimension),'*Other Charge'*), Sum ([Room Night OtherChargeRev]),0) +&lt;BR /&gt;...&lt;BR /&gt;if(wildmatch(GetFieldSelections(_Dimension),'*Other*'), Sum ([Room Night OtherRev]),0) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 21:18:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-built-from-selections/m-p/765356#M272037</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-20T21:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Expression built from selections</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-built-from-selections/m-p/765357#M272038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you SO much.&amp;nbsp; I implemented this and I thought it was working great until I clicked on all the selections and something odd happened.&amp;nbsp; Qlikview seems fine with the first six (no matter what six those happen to be).&amp;nbsp; The minute I choose a seventh option, or select All, it no longer works.&amp;nbsp; I get the same "No Data to Display" message.&amp;nbsp; If I deselect any two of the eight options, the data reappears.&amp;nbsp; Isn't that odd?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension),'*Activity*'), Sum ([Room Night ActivityRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension),'*Other Charge*'), Sum ([Room Night OtherChargeRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension),'*Shuttle*'), Sum ([Room Night ShuttleRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension),'*Spa Services*'), Sum ([Room Night SpaRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension),'*Package*'), Sum ([Room Night PkgRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension),'*Facility*'), Sum ([Room Night FacilityRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension),'*Alternate Inventory*'), Sum ([Room Night AltInvRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension),'*Other Revenue*'), Sum ([Room Night OtherRev]),0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought it was me and I went in and changed some _Dimension options and the Expression, but no dice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 21:45:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-built-from-selections/m-p/765357#M272038</guid>
      <dc:creator>raynac</dc:creator>
      <dc:date>2015-02-20T21:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Expression built from selections</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-built-from-selections/m-p/765358#M272039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, missed this. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/blush.png" /&gt;&lt;/P&gt;&lt;P&gt;It works as the selection box, by default shows up to six values, and shows count after that.&amp;nbsp; But there is a parameter to avoid this:&lt;/P&gt;&lt;P&gt;GetFieldSelections(_Dimension, ', ', &lt;STRONG&gt;10&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;Now you can have up to 10 values in this example&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 21:50:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-built-from-selections/m-p/765358#M272039</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-20T21:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Expression built from selections</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-built-from-selections/m-p/765359#M272040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I feel stupid, but I cannot get what you are saying to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First I tried this:&lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension),'*Activity*', 10), Sum ([Room Night ActivityRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension),'*Other Charge*', 10), Sum ([Room Night OtherChargeRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension),'*Shuttle*', 10), Sum ([Room Night ShuttleRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension),'*Spa Services*', 10), Sum ([Room Night SpaRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension),'*Package*', 10), Sum ([Room Night PkgRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension),'*Facility*', 10), Sum ([Room Night FacilityRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension),'*Alternate Inventory*', 10), Sum ([Room Night AltInvRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension),'*Other Revenue*', 10), Sum ([Room Night OtherRev]),0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then JUST in case, I tried this:&lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension, 10),'*Activity*'), Sum ([Room Night ActivityRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension, 10),'*Other Charge*'), Sum ([Room Night OtherChargeRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension, 10),'*Shuttle*'), Sum ([Room Night ShuttleRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension, 10),'*Spa Services*'), Sum ([Room Night SpaRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension, 10),'*Package*'), Sum ([Room Night PkgRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension, 10),'*Facility*'), Sum ([Room Night FacilityRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension, 10),'*Alternate Inventory*'), Sum ([Room Night AltInvRev]),0) + &lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension, 10),'*Other Revenue*'), Sum ([Room Night OtherRev]),0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then figured I was going about this wrong; so I tried adding GetFieldSelections(_Dimension, ', ', &lt;STRONG&gt;10&lt;/STRONG&gt;) to the beginning of the expression and that gives an error so I still cannot figure it out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I do apologize but I must ask...where does "GetFieldSelections(_Dimension, ', ', &lt;STRONG&gt;10&lt;/STRONG&gt;)" go?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 22:12:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-built-from-selections/m-p/765359#M272040</guid>
      <dc:creator>raynac</dc:creator>
      <dc:date>2015-02-20T22:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: Expression built from selections</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-built-from-selections/m-p/765360#M272041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you tried is not that I said...&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&amp;nbsp; Here it is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(wildmatch(GetFieldSelections(_Dimension, ', ', 10),'*Activity*'), Sum ([Room Night ActivityRev]),0) + &lt;BR /&gt;if(wildmatch(GetFieldSelections(_Dimension, ', ', 10),'*Other Charge'*), Sum ([Room Night OtherChargeRev]),0) +&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;...&lt;BR /&gt;if(wildmatch(GetFieldSelections(_Dimension, ', ', 10),'*Other*'), Sum ([Room Night OtherRev]),0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To see what it does, create a text box with expression&lt;/P&gt;&lt;P&gt;=GetFieldSelections(_Dimension)&lt;/P&gt;&lt;P&gt;and another text box with&lt;/P&gt;&lt;P&gt;=GetFieldSelections(_Dimension, ', ', 10),&lt;/P&gt;&lt;P&gt;and make selections, selecting fewer than 6 and greater than 6 values.&amp;nbsp; You'll see it right away &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;BTW, I assumed that you have only eight values in the _Dimension field, so limit 10 is more than enough.&amp;nbsp; If there are more. just replace this 10 with a greater number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it works this time...&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 23:47:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-built-from-selections/m-p/765360#M272041</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-20T23:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Expression built from selections</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-built-from-selections/m-p/765361#M272042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for your patience with me!&amp;nbsp; I am afraid that even though I have been working with the program for several years, I have only just started doing things other than the basics recently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This worked like a charm, once I understood what you were saying!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2015 14:01:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-built-from-selections/m-p/765361#M272042</guid>
      <dc:creator>raynac</dc:creator>
      <dc:date>2015-02-23T14:01:31Z</dc:date>
    </item>
  </channel>
</rss>

