<?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: Not Getting Values in variable in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Not-Getting-Values-in-variable/m-p/2093364#M89602</link>
    <description>&lt;P&gt;Okay, I had a closer look at your code and found several issues. Please use this code instead:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Set vSelect_MTD_QTD_HYTD_YTD='MTD';

Switch vSelect_MTD_QTD_HYTD_YTD

	Case 'MTD'
		let vDateRange = '(num(Sum({&amp;lt;FiscalMonthName=,FiscalQuarter=,FiscalYear= ,Date={"&amp;gt;='&amp;amp;chr(36)&amp;amp;'(=MonthStart('&amp;amp;chr(36)&amp;amp;'(vMax_CY)))&amp;lt;='&amp;amp;chr(36)&amp;amp;'(=Date('&amp;amp;chr(36)&amp;amp;'(vMax_CY)))"} &amp;gt;}[Invoice Domestic Rate])/'&amp;amp;chr(36)&amp;amp;'(vLacs),'&amp;amp;chr(36)&amp;amp;'(vRoundOff)))';
	
    Case 'QTD'
    	let vDateRange = '(num(Sum({&amp;lt;FiscalYear=,FiscalMonthName=,FiscalQuarter=,Date=,FiscalYearNum={"'&amp;amp;chr(36)&amp;amp;'(=max(FiscalYearNum))"},
FiscalQuarterNum={"'&amp;amp;chr(36)&amp;amp;'(=max({&amp;lt;FiscalYearNum={"'&amp;amp;chr(36)&amp;amp;'(=max(FiscalYearNum))"}&amp;gt;}FiscalQuarterNum))"}&amp;gt;}[Invoice Domestic Rate])/'&amp;amp;chr(36)&amp;amp;'(vLacs),'&amp;amp;chr(36)&amp;amp;'(vRoundOff)))';

    Case 'HYTD'
    	let vDateRange = '(num(Sum({&amp;lt;FiscalYear=,FiscalMonthName=,FiscalQuarter=,Date=,FiscalYearNum={"'&amp;amp;chr(36)&amp;amp;'(=max(FiscalYearNum))"},
FiscalHYNum={"'&amp;amp;chr(36)&amp;amp;'(=max({&amp;lt;FiscalYearNum={"'&amp;amp;chr(36)&amp;amp;'(=max(FiscalYearNum))"}&amp;gt;}FiscalHYNum))"}&amp;gt;}
[Invoice Domestic Rate])/'&amp;amp;chr(36)&amp;amp;'(vLacs),'&amp;amp;chr(36)&amp;amp;'(vRoundOff)))';

    Case 'YTD'
		let vDateRange = 'Num(sum({&amp;lt;FiscalMonthName=,FiscalMonth=,FiscalQuarter=,FiscalYear=,Date={"&amp;gt;='&amp;amp;chr(36)&amp;amp;'(='&amp;amp;chr(36)&amp;amp;'(vMin_CY))&amp;lt;='&amp;amp;chr(36)&amp;amp;'(='&amp;amp;chr(36)&amp;amp;'(vMax_CY))"}&amp;gt;}[Invoice Domestic Rate])/'&amp;amp;chr(36)&amp;amp;'(vLacs),'&amp;amp;chr(36)&amp;amp;'(vRoundOff))';

End Switch&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 13 Jul 2023 07:42:20 GMT</pubDate>
    <dc:creator>tealowk</dc:creator>
    <dc:date>2023-07-13T07:42:20Z</dc:date>
    <item>
      <title>Not Getting Values in variable</title>
      <link>https://community.qlik.com/t5/App-Development/Not-Getting-Values-in-variable/m-p/2092343#M89528</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;
&lt;P&gt;Please Help me to reach out at solution.&lt;/P&gt;
&lt;P&gt;I Have created a one Text file in that&amp;nbsp; one variable which have multiple if condition for MTD , QTD, HTD, YTD.&lt;/P&gt;
&lt;P&gt;but&lt;STRONG&gt; when ever I am going to run variable in Qliksense&amp;nbsp; after uploading a file its giving me&amp;nbsp; expression for&amp;nbsp;&amp;nbsp;MTD , QTD, HTD, YTD not value .&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Below mentioned&amp;nbsp; code that I am Using in Text file.&lt;/P&gt;
&lt;P&gt;SET vSelect_MTD_QTD_HYTD_YTD='MTD';&lt;/P&gt;
&lt;P&gt;Set vDateRange=if((vSelect_MTD_QTD_HYTD_YTD)='MTD',&lt;BR /&gt;'(num(Sum({&amp;lt;FiscalMonthName=,FiscalQuarter=,FiscalYear= ,Date={"&amp;gt;='&amp;amp;chr(36)&amp;amp;'(=MonthStart('&amp;amp;chr(36)&amp;amp;'(vMax_CY)))&amp;lt;='&amp;amp;chr(36)&amp;amp;'(=Date('&amp;amp;chr(36)&amp;amp;'(vMax_CY)))"} &amp;gt;}[Invoice Domestic Rate])/'&amp;amp;chr(36)&amp;amp;'(vLacs),'&amp;amp;chr(36)&amp;amp;'(vRoundOff)))',&lt;/P&gt;
&lt;P&gt;if((vSelect_MTD_QTD_HYTD_YTD)='QTD',&lt;BR /&gt;'(num(Sum({&amp;lt;FiscalYear=,FiscalMonthName=,FiscalQuarter=,Date=,FiscalYearNum={"'&amp;amp;chr(36)&amp;amp;'(=max(FiscalYearNum))"},&lt;BR /&gt;FiscalQuarterNum={"'&amp;amp;chr(36)&amp;amp;'(=max({&amp;lt;FiscalYearNum={"'&amp;amp;chr(36)&amp;amp;'(=max(FiscalYearNum))"}&amp;gt;}FiscalQuarterNum))"}&amp;gt;}[Invoice Domestic Rate])/'&amp;amp;chr(36)&amp;amp;'(vLacs),'&amp;amp;chr(36)&amp;amp;'(vRoundOff)))',&lt;/P&gt;
&lt;P&gt;if((vSelect_MTD_QTD_HYTD_YTD)='HTD',&lt;BR /&gt;'(num(Sum({&amp;lt;FiscalYear=,FiscalMonthName=,FiscalQuarter=,Date=,FiscalYearNum={"'&amp;amp;chr(36)&amp;amp;'(=max(FiscalYearNum))"}, &lt;BR /&gt;FiscalHYNum={"'&amp;amp;chr(36)&amp;amp;'(=max({&amp;lt;FiscalYearNum={"'&amp;amp;chr(36)&amp;amp;'(=max(FiscalYearNum))"}&amp;gt;}FiscalHYNum))"}&amp;gt;}&lt;BR /&gt;[Invoice Domestic Rate])/'&amp;amp;chr(36)&amp;amp;'(vLacs),'&amp;amp;chr(36)&amp;amp;'(vRoundOff)))',&lt;/P&gt;
&lt;P&gt;if((vSelect_MTD_QTD_HYTD_YTD)='YTD',&lt;BR /&gt;'Num(sum({&amp;lt;FiscalMonthName=,FiscalMonth=,FiscalQuarter=,FiscalYear=,Date={"&amp;gt;='&amp;amp;chr(36)&amp;amp;'(='&amp;amp;chr(36)&amp;amp;'(vMin_CY))&amp;lt;='&amp;amp;chr(36)&amp;amp;'(='&amp;amp;chr(36)&amp;amp;'(vMax_CY))"}&amp;gt;}[Invoice Domestic Rate])/'&amp;amp;chr(36)&amp;amp;'(vLacs),'&amp;amp;chr(36)&amp;amp;'(vRoundOff))',&lt;/P&gt;
&lt;P&gt;))));&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 05:19:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Not-Getting-Values-in-variable/m-p/2092343#M89528</guid>
      <dc:creator>Hania</dc:creator>
      <dc:date>2023-07-11T05:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Not Getting Values in variable</title>
      <link>https://community.qlik.com/t5/App-Development/Not-Getting-Values-in-variable/m-p/2092416#M89532</link>
      <description>&lt;P&gt;Hi Hania,&lt;/P&gt;
&lt;P&gt;If I understand you correctly,&amp;nbsp;&lt;SPAN&gt;vSelect_MTD_QTD_HYTD_YTD&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;works as expected, but for&amp;nbsp;vDateRange you don't get what expected when you use it on the front end. Do you use the dollar-sign expression (e.g. $(vDateRange))?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 07:55:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Not-Getting-Values-in-variable/m-p/2092416#M89532</guid>
      <dc:creator>Primrose</dc:creator>
      <dc:date>2023-07-11T07:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: Not Getting Values in variable</title>
      <link>https://community.qlik.com/t5/App-Development/Not-Getting-Values-in-variable/m-p/2092482#M89542</link>
      <description>&lt;P&gt;yes when i am calling &lt;SPAN&gt;$(vDateRange)&amp;nbsp;&lt;/SPAN&gt;then its work properly but giving me the expression (that i have written for calculating the MTD, YTD, QTD,HTD ) for MTD , YTD so on ,&lt;/P&gt;
&lt;P&gt;instead of expression i want value of MTD, YTD so on.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 10:06:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Not-Getting-Values-in-variable/m-p/2092482#M89542</guid>
      <dc:creator>Hania</dc:creator>
      <dc:date>2023-07-11T10:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Not Getting Values in variable</title>
      <link>https://community.qlik.com/t5/App-Development/Not-Getting-Values-in-variable/m-p/2092525#M89551</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;if you want to assign a calculated value to a variable you have to use the &lt;EM&gt;LET&lt;/EM&gt; statement instead of the &lt;EM&gt;SET&lt;/EM&gt; statement.&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;LET vDateRange = if(...);&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope that helps.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Kind regards from Brussels,&lt;/P&gt;
&lt;P&gt;Thilo&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 11:17:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Not-Getting-Values-in-variable/m-p/2092525#M89551</guid>
      <dc:creator>tealowk</dc:creator>
      <dc:date>2023-07-11T11:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Not Getting Values in variable</title>
      <link>https://community.qlik.com/t5/App-Development/Not-Getting-Values-in-variable/m-p/2092978#M89579</link>
      <description>&lt;P&gt;I suggest to create appropriate flag-fields within the calendar - maybe several ones whereby the #TD could be nested within a single one, for example:&lt;/P&gt;
&lt;P&gt;if(inmonthtodate(Date, today(), 0), 1,&lt;BR /&gt;if(inquartertodate(Date, today(), 0), 2,&lt;BR /&gt;if(inyeartodate(Date, today(), 0) and Month &amp;lt;= 6, 3,&lt;BR /&gt;if(inyeartodate(Date, today(), 0), 4), 5))) as Flag&lt;/P&gt;
&lt;P&gt;and the expression may look like:&lt;/P&gt;
&lt;P&gt;sum({&amp;lt; Flag = {"&amp;lt;=$(vSelect)"}&amp;gt;} Value)&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 08:51:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Not-Getting-Values-in-variable/m-p/2092978#M89579</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-07-12T08:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Not Getting Values in variable</title>
      <link>https://community.qlik.com/t5/App-Development/Not-Getting-Values-in-variable/m-p/2093355#M89601</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/140635"&gt;@tealowk&lt;/a&gt;&amp;nbsp;, I Agree with you ,&lt;/P&gt;
&lt;P&gt;But when I am using Let instead of Set then its giving me only MTD Value,&lt;/P&gt;
&lt;P&gt;means in &lt;SPAN&gt;vDateRange variable there is only MTD value are storing after using Let.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;(Not giving YTD,HTD,QTD value ) .&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 07:28:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Not-Getting-Values-in-variable/m-p/2093355#M89601</guid>
      <dc:creator>Hania</dc:creator>
      <dc:date>2023-07-13T07:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Not Getting Values in variable</title>
      <link>https://community.qlik.com/t5/App-Development/Not-Getting-Values-in-variable/m-p/2093364#M89602</link>
      <description>&lt;P&gt;Okay, I had a closer look at your code and found several issues. Please use this code instead:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Set vSelect_MTD_QTD_HYTD_YTD='MTD';

Switch vSelect_MTD_QTD_HYTD_YTD

	Case 'MTD'
		let vDateRange = '(num(Sum({&amp;lt;FiscalMonthName=,FiscalQuarter=,FiscalYear= ,Date={"&amp;gt;='&amp;amp;chr(36)&amp;amp;'(=MonthStart('&amp;amp;chr(36)&amp;amp;'(vMax_CY)))&amp;lt;='&amp;amp;chr(36)&amp;amp;'(=Date('&amp;amp;chr(36)&amp;amp;'(vMax_CY)))"} &amp;gt;}[Invoice Domestic Rate])/'&amp;amp;chr(36)&amp;amp;'(vLacs),'&amp;amp;chr(36)&amp;amp;'(vRoundOff)))';
	
    Case 'QTD'
    	let vDateRange = '(num(Sum({&amp;lt;FiscalYear=,FiscalMonthName=,FiscalQuarter=,Date=,FiscalYearNum={"'&amp;amp;chr(36)&amp;amp;'(=max(FiscalYearNum))"},
FiscalQuarterNum={"'&amp;amp;chr(36)&amp;amp;'(=max({&amp;lt;FiscalYearNum={"'&amp;amp;chr(36)&amp;amp;'(=max(FiscalYearNum))"}&amp;gt;}FiscalQuarterNum))"}&amp;gt;}[Invoice Domestic Rate])/'&amp;amp;chr(36)&amp;amp;'(vLacs),'&amp;amp;chr(36)&amp;amp;'(vRoundOff)))';

    Case 'HYTD'
    	let vDateRange = '(num(Sum({&amp;lt;FiscalYear=,FiscalMonthName=,FiscalQuarter=,Date=,FiscalYearNum={"'&amp;amp;chr(36)&amp;amp;'(=max(FiscalYearNum))"},
FiscalHYNum={"'&amp;amp;chr(36)&amp;amp;'(=max({&amp;lt;FiscalYearNum={"'&amp;amp;chr(36)&amp;amp;'(=max(FiscalYearNum))"}&amp;gt;}FiscalHYNum))"}&amp;gt;}
[Invoice Domestic Rate])/'&amp;amp;chr(36)&amp;amp;'(vLacs),'&amp;amp;chr(36)&amp;amp;'(vRoundOff)))';

    Case 'YTD'
		let vDateRange = 'Num(sum({&amp;lt;FiscalMonthName=,FiscalMonth=,FiscalQuarter=,FiscalYear=,Date={"&amp;gt;='&amp;amp;chr(36)&amp;amp;'(='&amp;amp;chr(36)&amp;amp;'(vMin_CY))&amp;lt;='&amp;amp;chr(36)&amp;amp;'(='&amp;amp;chr(36)&amp;amp;'(vMax_CY))"}&amp;gt;}[Invoice Domestic Rate])/'&amp;amp;chr(36)&amp;amp;'(vLacs),'&amp;amp;chr(36)&amp;amp;'(vRoundOff))';

End Switch&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 13 Jul 2023 07:42:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Not-Getting-Values-in-variable/m-p/2093364#M89602</guid>
      <dc:creator>tealowk</dc:creator>
      <dc:date>2023-07-13T07:42:20Z</dc:date>
    </item>
  </channel>
</rss>

