<?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 maxstring mystery in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209277#M64337</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And I'd like to know why that line would return 'Product' even if 'Team' is also selected... as "Team" would 'greater than' "Product" in a maxstring function...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Dec 2010 16:19:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-12-02T16:19:03Z</dc:date>
    <item>
      <title>maxstring mystery</title>
      <link>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209269#M64329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello... Can anyone explain how this formula is working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;&lt;B&gt;maxstring&lt;/B&gt;(&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;Dimensions&lt;/B&gt;='Product',&lt;B&gt;Dimensions&lt;/B&gt;,&lt;B&gt;null&lt;/B&gt;())) &amp;amp; ':' &amp;amp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;maxstring&lt;/B&gt;(&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;Dimensions&lt;/B&gt;='Source',&lt;B&gt;Dimensions&lt;/B&gt;,&lt;B&gt;null&lt;/B&gt;())) &amp;amp; ':' &amp;amp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;maxstring&lt;/B&gt;(&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;Dimensions&lt;/B&gt;='Team',&lt;B&gt;Dimensions&lt;/B&gt;,&lt;B&gt;null&lt;/B&gt;())) &amp;amp; ':'&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Basically Dimensions is an inline table with 3 entries (Product, Source and Team).&lt;/P&gt;&lt;P&gt;I've set Dimensions up as the source for a list box and want to achieve a string showing all items selected in the list box seperated with a colon.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This all works fine... but I just don't understand how it works... I've tried breaking it down into parts but none of this seems to make sense!?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks! Mike&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Dec 2010 13:20:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209269#M64329</guid>
      <dc:creator />
      <dc:date>2010-12-01T13:20:05Z</dc:date>
    </item>
    <item>
      <title>maxstring mystery</title>
      <link>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209270#M64330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;B&gt;maxstring&lt;/B&gt;( &lt;B&gt;if&lt;/B&gt;(&lt;B&gt;Dimensions&lt;/B&gt;='Product',&lt;B&gt;Dimensions&lt;/B&gt;,&lt;B&gt;null&lt;/B&gt;() ) )&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If() returns Dimensions only when Dimensions ='Product' (then of course it returns 'Product')&lt;/LI&gt;&lt;LI&gt;maxstring isn't necessary because if() returns only one Value ('Product') or null()&lt;/LI&gt;&lt;LI&gt;&amp;amp; means concat result above with ';' and the result of the next if()&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;repeat above for the other if()-statments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT there is an alternative:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;='Selections for Dimensions: ' &amp;amp; getfieldselections(Dimensions))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Or the John Witherspoon Version I found in this formu a while ago: (Thanks John!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;='Selections for VDatum:&lt;BR /&gt;' &amp;amp; if(max(VDatum)-min(VDatum)+1=getselectedcount(VDatum),min(VDatum) &amp;amp; ' - ' &amp;amp; max(VDatum),getfieldselections(VDatum))&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Dec 2010 13:36:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209270#M64330</guid>
      <dc:creator />
      <dc:date>2010-12-01T13:36:35Z</dc:date>
    </item>
    <item>
      <title>maxstring mystery</title>
      <link>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209271#M64331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Roland, thanks for the reply...&lt;/P&gt;&lt;P&gt;Some things I'm still unsure about...&lt;/P&gt;&lt;P&gt;1 - If I remove the maxstring function the formula just returns " - "&lt;/P&gt;&lt;P&gt;2 - Also if I do a simple formula like: =&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;Dimensions&lt;/B&gt; = 'Product', 'Product Selected','Product Not Selected')&lt;BR /&gt; this evaluates as I'd expect when I select Product from the list box but when I&lt;BR /&gt; select Product and another item the if statement evaluates as 'Product Not Selected'&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached a sample doc if that helps understand...&lt;/P&gt;&lt;P&gt;Cheers, Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Dec 2010 14:49:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209271#M64331</guid>
      <dc:creator />
      <dc:date>2010-12-01T14:49:08Z</dc:date>
    </item>
    <item>
      <title>maxstring mystery</title>
      <link>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209272#M64332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;look at my little application and play with it. The most exciting question is the returnvalue of Maxstring() in combination with a nested if() and NO selection:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=maxstring( if(Dimensions='Product', Dimensions, null()) )&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;in a text object. &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Even when QV-help says "These functions can only be used on fields in chart expressions." Is it a bug or a feature?&lt;/P&gt;&lt;P&gt;Regards, Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Dec 2010 19:42:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209272#M64332</guid>
      <dc:creator />
      <dc:date>2010-12-01T19:42:07Z</dc:date>
    </item>
    <item>
      <title>maxstring mystery</title>
      <link>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209273#M64333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hum... very strange...&lt;/P&gt;&lt;P&gt;Thanks for your extra comments... so now I can understand that when multiple items are selected in the list box, then displaying 'Dimensions' in a text box is impossible due to the multi-valued nature. If only one item is selected then a text box &lt;STRONG&gt;will&lt;/STRONG&gt; display the single result.&lt;/P&gt;&lt;P&gt;So if I select all three items in the list box (Product, Source and Team) then this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=':' &amp;amp;&lt;B&gt;maxstring&lt;/B&gt;( &lt;B&gt;if&lt;/B&gt;(&lt;B&gt;Dimensions&lt;/B&gt;='Product',&lt;B&gt;Dimensions&lt;/B&gt;,&lt;B&gt;null&lt;/B&gt;())) &amp;amp; ':'&lt;BR /&gt;&amp;amp; &lt;B&gt;maxstring&lt;/B&gt;(&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;Dimensions&lt;/B&gt;='Source',&lt;B&gt;Dimensions&lt;/B&gt;,&lt;B&gt;null&lt;/B&gt;())) &amp;amp; ':'&lt;BR /&gt;&amp;amp; &lt;B&gt;maxstring&lt;/B&gt;(&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;Dimensions&lt;/B&gt;='Team',&lt;B&gt;Dimensions&lt;/B&gt;,&lt;B&gt;null&lt;/B&gt;())) &amp;amp; ':'&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;returns " :Product:Source:Team: " but I would have thought it shoud return " :Team:Team:Team: " because the 3 if statments would each return a list of the 3 selected items and 'Team' is the maxstring for each of the 3 if statement results ?!?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 10:47:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209273#M64333</guid>
      <dc:creator />
      <dc:date>2010-12-02T10:47:32Z</dc:date>
    </item>
    <item>
      <title>maxstring mystery</title>
      <link>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209274#M64334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;yes, the behaviour the combination maxstring() and a nested if() is strange. I will ask our technical QT-rep. for an explanation.&lt;/P&gt;&lt;P&gt;RR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 15:37:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209274#M64334</guid>
      <dc:creator />
      <dc:date>2010-12-02T15:37:05Z</dc:date>
    </item>
    <item>
      <title>maxstring mystery</title>
      <link>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209275#M64335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let me help you simplify - instead of multiple MaxString, try function CONCAT() :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCAT(Dimensions, ';')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll get a list of all "possible" (selected or associated) Dimensions separated by semicolon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV id="refHTML"&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 15:41:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209275#M64335</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2010-12-02T15:41:36Z</dc:date>
    </item>
    <item>
      <title>maxstring mystery</title>
      <link>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209276#M64336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oleg,&lt;/P&gt;&lt;P&gt;thanks for your reply. The main questions is: Why does the following expression in a textbox show 'Product' &lt;I&gt;when nothing is selected&lt;/I&gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=maxstring( if(Dimensions='Product', Dimensions, 'null()')&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;In my mind the if() has to return 'null()'. And maxstring of null() is what? For testing look into my little app above.&lt;/P&gt;&lt;P&gt;RR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 16:06:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209276#M64336</guid>
      <dc:creator />
      <dc:date>2010-12-02T16:06:11Z</dc:date>
    </item>
    <item>
      <title>maxstring mystery</title>
      <link>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209277#M64337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And I'd like to know why that line would return 'Product' even if 'Team' is also selected... as "Team" would 'greater than' "Product" in a maxstring function...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 16:19:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209277#M64337</guid>
      <dc:creator />
      <dc:date>2010-12-02T16:19:03Z</dc:date>
    </item>
    <item>
      <title>maxstring mystery</title>
      <link>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209278#M64338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;CONCAT(Dimensions, ';')&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;also shows all items if none are selected...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 18:13:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209278#M64338</guid>
      <dc:creator />
      <dc:date>2010-12-02T18:13:43Z</dc:date>
    </item>
    <item>
      <title>maxstring mystery</title>
      <link>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209279#M64339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, both functions are working with all &lt;B&gt;POSSIBLE&lt;/B&gt; values - they don't have to be selected.&lt;/P&gt;&lt;P&gt;If you are after Selected values &lt;B&gt;only&lt;/B&gt;, you need to use different functions like GetFieldSelections:&lt;/P&gt;&lt;H4&gt;GetFieldSelections&lt;A id="GetFieldSelections(" name="GetFieldSelections("&gt;&lt;/A&gt;( fieldname [, valuesep [, maxvalues=6 ]] )&lt;/H4&gt;&lt;P style="margin-bottom:0px;"&gt;returns a string containing the current selections in a given field. Valuesep is the delimiter between selected values and defaults to ', '. Maxvalues is the highest number of individual values that will be displayed before 'x of y' notation is used instead.&lt;/P&gt;&lt;H2&gt;Examples:&lt;/H2&gt;&lt;P style="margin-bottom:0px;margin-left:40px;font-weight:bold;"&gt;getfieldselections(Country)&lt;BR /&gt;getfieldselections (Country, ';' )&lt;BR /&gt;getfieldselections (Country, ',' , 10 )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV id="refHTML"&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 23:15:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/maxstring-mystery/m-p/209279#M64339</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2010-12-02T23:15:12Z</dc:date>
    </item>
  </channel>
</rss>

