<?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 variable expansion with multiple parameters containing commas in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/variable-expansion-with-multiple-parameters-containing-commas/m-p/320855#M1197274</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;eDateDiff is a variable with two parameters $1 and $2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;round( ($1) * 86400 ) - round( ($2) * 86400 )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its objective is to compute the difference between two dates in seconds and rounding to seconds too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However the problem is general and is due to the passing an expressin with commas as variable parameter. In this case the comma is interpreted as parameter separator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probably it's only a matter of dollar sign expansion but I don't know how to solve it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I have been clear enough. Otherwise I'l try to post a simplier example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 May 2011 18:42:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-05-23T18:42:54Z</dc:date>
    <item>
      <title>variable expansion with multiple parameters containing commas</title>
      <link>https://community.qlik.com/t5/QlikView/variable-expansion-with-multiple-parameters-containing-commas/m-p/320853#M1197272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following multiple parameters function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;round( ($1) * 86400 ) - round( ($2) * 86400 )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;defined as eDateDiff in Variable Overview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I call it from an expression chart like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(eDateDiff(DATA_APP+NumMax(1,DURATA)*FRAZ*1440,DAY+DALLE)) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unfortunately the comma in the NumMax is interpreted as the parameter separator of the eDateDiff function and I get this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;round( (DATA_APP+NumMax(1) * 86400 ) - round( (DURATA)*FRAZ*1440) * 86400 ) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which is clearly wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong? Any suggestion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank in advance for you help,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 17:21:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-expansion-with-multiple-parameters-containing-commas/m-p/320853#M1197272</guid>
      <dc:creator />
      <dc:date>2011-05-23T17:21:27Z</dc:date>
    </item>
    <item>
      <title>variable expansion with multiple parameters containing commas</title>
      <link>https://community.qlik.com/t5/QlikView/variable-expansion-with-multiple-parameters-containing-commas/m-p/320854#M1197273</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;&amp;nbsp;&amp;nbsp; Can you provide me some more info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Like eDateDiff is a function..?&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Where are you using the round function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Please give details&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 18:09:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-expansion-with-multiple-parameters-containing-commas/m-p/320854#M1197273</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-05-23T18:09:45Z</dc:date>
    </item>
    <item>
      <title>variable expansion with multiple parameters containing commas</title>
      <link>https://community.qlik.com/t5/QlikView/variable-expansion-with-multiple-parameters-containing-commas/m-p/320855#M1197274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;eDateDiff is a variable with two parameters $1 and $2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;round( ($1) * 86400 ) - round( ($2) * 86400 )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its objective is to compute the difference between two dates in seconds and rounding to seconds too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However the problem is general and is due to the passing an expressin with commas as variable parameter. In this case the comma is interpreted as parameter separator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probably it's only a matter of dollar sign expansion but I don't know how to solve it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I have been clear enough. Otherwise I'l try to post a simplier example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 18:42:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-expansion-with-multiple-parameters-containing-commas/m-p/320855#M1197274</guid>
      <dc:creator />
      <dc:date>2011-05-23T18:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: variable expansion with multiple parameters containing commas</title>
      <link>https://community.qlik.com/t5/QlikView/variable-expansion-with-multiple-parameters-containing-commas/m-p/320856#M1197275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you're doing it exactly like you should.&amp;nbsp; Unfortunately, QlikView disagrees, as it has a bug that prevents you from using commas in the parameters.&amp;nbsp; Now, I'm calling it a bug, but I suspect QlikTech would call it working as designed, and we'd need to submit a feature request to allow this approach to actually work.&amp;nbsp; So don't hold your breath waiting for them to fix it.&amp;nbsp; In the mean time, we need a workaround.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to remember how I've worked around it, as I know I've encountered it before.&amp;nbsp; But I'm thinking all I did was figure out how to write the parameter in a way that didn't have commas.&amp;nbsp; I don't see how to do that in your case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe the inner dollar sign expansion would occur first, which would prevent you from just making another variable to hold your sub expression.&amp;nbsp; All I can think to do is make an eDateDiff2 "function" that includes your additional calculations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;round(($1+rangemax(1,$2)*$3)*86400)-round(($4+$5)*86400)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully there's a better way, because I hate that solution, but I'm not thinking of anything else right now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oh, and use rangemax() not nummax().&amp;nbsp; Per the help text, "The nummax function is now obsolete and is superceded by the rangemax function."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 23:25:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-expansion-with-multiple-parameters-containing-commas/m-p/320856#M1197275</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-05-23T23:25:08Z</dc:date>
    </item>
    <item>
      <title>variable expansion with multiple parameters containing commas</title>
      <link>https://community.qlik.com/t5/QlikView/variable-expansion-with-multiple-parameters-containing-commas/m-p/320857#M1197276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much John. Now that I know where the problem is I'll find some other way!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also thank you for the rangemax hint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;&lt;P&gt;Fil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2011 08:49:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-expansion-with-multiple-parameters-containing-commas/m-p/320857#M1197276</guid>
      <dc:creator />
      <dc:date>2011-05-24T08:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: variable expansion with multiple parameters containing commas</title>
      <link>https://community.qlik.com/t5/QlikView/variable-expansion-with-multiple-parameters-containing-commas/m-p/320858#M1197279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i know this is an old post but i hope someone like me will find it useful. Dmitri Gudkov wrote an awesome post and described workarounds to the issue with commas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://bi-review.blogspot.com/2012/05/how-to-write-reusable-and-expandable.html" title="http://bi-review.blogspot.com/2012/05/how-to-write-reusable-and-expandable.html"&gt;http://bi-review.blogspot.com/2012/05/how-to-write-reusable-and-expandable.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2014 13:20:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-expansion-with-multiple-parameters-containing-commas/m-p/320858#M1197279</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-01T13:20:38Z</dc:date>
    </item>
  </channel>
</rss>

