<?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: Can a variable be formatted as a number? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Can-a-variable-be-formatted-as-a-number/m-p/1345239#M29768</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're welcome. Glad you got it sorted now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 May 2017 15:23:55 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2017-05-26T15:23:55Z</dc:date>
    <item>
      <title>Can a variable be formatted as a number?</title>
      <link>https://community.qlik.com/t5/App-Development/Can-a-variable-be-formatted-as-a-number/m-p/1345234#M29763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a field in my Master Calendar called Month Sequence.&lt;/P&gt;&lt;P&gt;(,AutoNumber( year(TempDate)&amp;amp;month(TempDate)) as MonthSequence)&lt;/P&gt;&lt;P&gt;It is generated as a number field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a KPI, Max(MonthSequence)&amp;nbsp;&amp;nbsp; show 142&amp;nbsp; which is correct.&lt;/P&gt;&lt;P&gt;Also in a KPI&amp;nbsp;&amp;nbsp; Max(MonthSequence)-12&amp;nbsp;&amp;nbsp; shows 130&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I can perform calculations on that number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’ve defined the variable $(vMaxMonSeq) as Max(MonthSequence)&amp;nbsp;&amp;nbsp;&amp;nbsp; adding the variable to a KPI shows a value of&amp;nbsp; 142&lt;/P&gt;&lt;P&gt;But, I can’t do any calculations with it. &lt;/P&gt;&lt;P&gt;I've tried setting it up as a number with num(), num#(), and with num(num# (&lt;SPAN style="font-size: 13.3333px;"&gt;Max(MonthSequence)))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I can change the variable definition to Max(MonthSequcne)-12&amp;nbsp;&amp;nbsp; and it will show correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Do all variables come in as text?&amp;nbsp;&amp;nbsp; What are my options?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Nothing seems to work.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:43:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-a-variable-be-formatted-as-a-number/m-p/1345234#M29763</guid>
      <dc:creator>jtay</dc:creator>
      <dc:date>2024-11-16T09:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can a variable be formatted as a number?</title>
      <link>https://community.qlik.com/t5/App-Development/Can-a-variable-be-formatted-as-a-number/m-p/1345235#M29764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;But, I can’t do any calculations with it.&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Can you give an example of a calculation you're trying to do. An example QS app would help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 May 2017 14:30:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-a-variable-be-formatted-as-a-number/m-p/1345235#M29764</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2017-05-26T14:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can a variable be formatted as a number?</title>
      <link>https://community.qlik.com/t5/App-Development/Can-a-variable-be-formatted-as-a-number/m-p/1345236#M29765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will work on getting an example...&lt;/P&gt;&lt;P&gt;but the calculation I'm trying is simply subtracting 12.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(vMaxMonSeq)-12 &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 May 2017 14:43:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-a-variable-be-formatted-as-a-number/m-p/1345236#M29765</guid>
      <dc:creator>jtay</dc:creator>
      <dc:date>2017-05-26T14:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can a variable be formatted as a number?</title>
      <link>https://community.qlik.com/t5/App-Development/Can-a-variable-be-formatted-as-a-number/m-p/1345237#M29766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you could try $(&lt;SPAN style="color: #ff0000;"&gt;#&lt;/SPAN&gt;vMaxMonSeq) for getting the number...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 May 2017 14:46:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-a-variable-be-formatted-as-a-number/m-p/1345237#M29766</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-26T14:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can a variable be formatted as a number?</title>
      <link>https://community.qlik.com/t5/App-Development/Can-a-variable-be-formatted-as-a-number/m-p/1345238#M29767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert&lt;/P&gt;&lt;P&gt;I got an example app ready to post and was adding the KPIs with the calculation examples to a sheet.&amp;nbsp; &lt;/P&gt;&lt;P&gt;I created the variable.&amp;nbsp; I added two KPIs without the variable and two more with the variable.&lt;/P&gt;&lt;P&gt;They all worked correctly.&amp;nbsp; (scratches head and wonders why...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I copied everything into my main app and now things are calculating correctly there too.&lt;/P&gt;&lt;P&gt;Problem solved, but I don't know why it wasn't working before.&lt;/P&gt;&lt;P&gt;I guess the exercise of starting over helped.&amp;nbsp; thanks you for the suggestion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 May 2017 15:19:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-a-variable-be-formatted-as-a-number/m-p/1345238#M29767</guid>
      <dc:creator>jtay</dc:creator>
      <dc:date>2017-05-26T15:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can a variable be formatted as a number?</title>
      <link>https://community.qlik.com/t5/App-Development/Can-a-variable-be-formatted-as-a-number/m-p/1345239#M29768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're welcome. Glad you got it sorted now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 May 2017 15:23:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-a-variable-be-formatted-as-a-number/m-p/1345239#M29768</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2017-05-26T15:23:55Z</dc:date>
    </item>
  </channel>
</rss>

