<?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: How to transform number to date in Qlik Sense expression in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-transform-number-to-date-in-Qlik-Sense-expression/m-p/1687435#M52376</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;First of all you should create a date in script, like below.&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;Makedate(Left(&lt;SPAN&gt;[SH_historico_1.ANOMES],4),Right([SH_historico_1.ANOMES],2)) as Date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;From xyz;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now you should update your expression as below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If( Date&amp;gt;= '$(=Addmonths(Max(Date),-1))' and Date &amp;lt;= '$(=Max(Date))', Date)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 24 Mar 2020 18:54:43 GMT</pubDate>
    <dc:creator>kaushiknsolanki</dc:creator>
    <dc:date>2020-03-24T18:54:43Z</dc:date>
    <item>
      <title>How to transform number to date in Qlik Sense expression</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-transform-number-to-date-in-Qlik-Sense-expression/m-p/1687426#M52375</link>
      <description>&lt;P&gt;In a graph I'm trying to show mounts between last month and this month with this expression:&lt;/P&gt;&lt;P&gt;=If( [SH_historico_1.ANOMES] &amp;gt;= '$(=Max([SH_historico_1.ANOMES])-1)' and [SH_historico_1.ANOMES] &amp;lt;= '$(=Max([SH_historico_1.ANOMES]))', [SH_historico_1.ANOMES])&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;When I write `[SH_historico_1.ANOMES]` I'm referring to Period, Like 'YYYYMM'&lt;BR /&gt;And when I subtract `-1` I'm just substact 1 to, example: 202002 -1 = 202001, so works, because It will calculate the correct period.&lt;/P&gt;&lt;P&gt;But... If the month it is january? YYYY01? example 202001 -1 = `202000` 00 month number it does not exist. The 00 it should be 12.&lt;/P&gt;&lt;P&gt;So I'm wondering what if I treat the number as a date?&lt;BR /&gt;I'm trying to use `Date()` function but I'm little stuck.&lt;/P&gt;&lt;P&gt;How it could be with correct syntax?&lt;/P&gt;&lt;P&gt;Another solution I'm thinking it is to set some code in editor code, but still developing the idea.&lt;/P&gt;&lt;P&gt;Any help it is welcome.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:53:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-transform-number-to-date-in-Qlik-Sense-expression/m-p/1687426#M52375</guid>
      <dc:creator>solverproblems</dc:creator>
      <dc:date>2024-11-16T02:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to transform number to date in Qlik Sense expression</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-transform-number-to-date-in-Qlik-Sense-expression/m-p/1687435#M52376</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;First of all you should create a date in script, like below.&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;Makedate(Left(&lt;SPAN&gt;[SH_historico_1.ANOMES],4),Right([SH_historico_1.ANOMES],2)) as Date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;From xyz;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now you should update your expression as below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If( Date&amp;gt;= '$(=Addmonths(Max(Date),-1))' and Date &amp;lt;= '$(=Max(Date))', Date)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 18:54:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-transform-number-to-date-in-Qlik-Sense-expression/m-p/1687435#M52376</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2020-03-24T18:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to transform number to date in Qlik Sense expression</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-transform-number-to-date-in-Qlik-Sense-expression/m-p/1687492#M52382</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 23:00:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-transform-number-to-date-in-Qlik-Sense-expression/m-p/1687492#M52382</guid>
      <dc:creator>solverproblems</dc:creator>
      <dc:date>2020-03-24T23:00:23Z</dc:date>
    </item>
  </channel>
</rss>

