<?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: From measure to dimension in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/From-measure-to-dimension/m-p/1265577#M25907</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi! Thanks a lot, I have corrected the formulae, and your result works fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jan 2017 08:23:04 GMT</pubDate>
    <dc:creator>simotrab</dc:creator>
    <dc:date>2017-01-04T08:23:04Z</dc:date>
    <item>
      <title>From measure to dimension</title>
      <link>https://community.qlik.com/t5/App-Development/From-measure-to-dimension/m-p/1265575#M25905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi community!&lt;/P&gt;&lt;P&gt;I am facing this issue: I have created a measure that generates nominal results, in other words, letters.&lt;/P&gt;&lt;P&gt;Here an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;load*inline&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;[date,customer,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;29/10/2016,'a',&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;29/11/2016,'a'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;29/12/2016,'a'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;12/10/2016,'b',&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;13/10/2016,'b'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;14/10/2016,'b'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;]&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanted to mark the customers that are not appearing in this way: generally customer x appear in average every day, it is 3 day that does not appear, this is a problem. Here we go:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="148186" alt="dimmea.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/148186_dimmea.PNG" style="height: 623px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The measure are these:&lt;/P&gt;&lt;P&gt;last appear, the last date of the customer :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;max([date])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dayFromLast, day from the last appearance of the customer&amp;nbsp; (use 03/01/2017, DD/MM/YYYY):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(today()-max(date))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT:&lt;/P&gt;&lt;P&gt;GeneralBehaviour, how often the customer appears (average):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(max([date])- min([date]))/(count(customer)-1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT:&lt;/P&gt;&lt;P&gt;risk, if the days of the customer's last appearance is bigger than the GeneralBehaviour (bad) or viceversa (good)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if((max([date])- min([date]))/(count(customer)-1)&amp;gt;(today()-max(date)),'good','bad')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is: could I have risk as dimension, so I can put it in a filter? If so, how? Logically putting it in a filter is not possible. I know that I can solve it adding a column in the data load, but I'd like to do it in the app without touching the data load.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2017 15:49:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/From-measure-to-dimension/m-p/1265575#M25905</guid>
      <dc:creator>simotrab</dc:creator>
      <dc:date>2017-01-03T15:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: From measure to dimension</title>
      <link>https://community.qlik.com/t5/App-Development/From-measure-to-dimension/m-p/1265576#M25906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1st a question for you.... Count(DISTINCT Customer) will always be 1, no? I mean Customer is a dimension, what is the point of dividing by DISTINCT Customer? May be you Want Count(Customer)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Coming back to your question, try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Aggr(If((Max({1}[date]) - Min(&lt;STRONG style="font-size: 13.3333px;"&gt;{1}&lt;/STRONG&gt;[date]))/Count(&lt;STRONG style="font-size: 13.3333px;"&gt;{1}&lt;/STRONG&gt;DISTINCT customer) &amp;gt; (Today() - Max(&lt;STRONG style="font-size: 13.3333px;"&gt;{1}&lt;/STRONG&gt;date)), 'good', 'bad'), &lt;STRONG style="font-size: 13.3333px;"&gt;customer&lt;/STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2017 15:56:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/From-measure-to-dimension/m-p/1265576#M25906</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-01-03T15:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: From measure to dimension</title>
      <link>https://community.qlik.com/t5/App-Development/From-measure-to-dimension/m-p/1265577#M25907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi! Thanks a lot, I have corrected the formulae, and your result works fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2017 08:23:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/From-measure-to-dimension/m-p/1265577#M25907</guid>
      <dc:creator>simotrab</dc:creator>
      <dc:date>2017-01-04T08:23:04Z</dc:date>
    </item>
  </channel>
</rss>

