<?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 Expression in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Expression/m-p/103442#M6961</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;So I have a few measures that I would like to, I guess, merge to create a new one.&amp;nbsp; Basically I have a measure that gives total of all sales based on expression:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum(aggr(sum(distinct(quantity*unit_price)), order_product_id)) +&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SUM(aggr(sum({$&amp;lt;order_type={'refund'}&amp;gt;}distinct (refunded_product_discount_total/refunded_quantity*-1)*quantity), order_product_id))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I also have a date dimension that retrieves dates within last 60 days, with expression as follows:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(floor([completed_date.autoCalendar.Date])&amp;gt;=num(today())-60 and floor([completed_date.autoCalendar.Date])&amp;lt;= num(today()),[completed_date.autoCalendar.Date],null())&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I need to create a few of these, so any help or examples of set analysis with a time frame is appreciated.&amp;nbsp; Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Aug 2018 16:19:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-08-20T16:19:34Z</dc:date>
    <item>
      <title>Expression</title>
      <link>https://community.qlik.com/t5/App-Development/Expression/m-p/103442#M6961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;So I have a few measures that I would like to, I guess, merge to create a new one.&amp;nbsp; Basically I have a measure that gives total of all sales based on expression:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum(aggr(sum(distinct(quantity*unit_price)), order_product_id)) +&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SUM(aggr(sum({$&amp;lt;order_type={'refund'}&amp;gt;}distinct (refunded_product_discount_total/refunded_quantity*-1)*quantity), order_product_id))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I also have a date dimension that retrieves dates within last 60 days, with expression as follows:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(floor([completed_date.autoCalendar.Date])&amp;gt;=num(today())-60 and floor([completed_date.autoCalendar.Date])&amp;lt;= num(today()),[completed_date.autoCalendar.Date],null())&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I need to create a few of these, so any help or examples of set analysis with a time frame is appreciated.&amp;nbsp; Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2018 16:19:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Expression/m-p/103442#M6961</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-20T16:19:34Z</dc:date>
    </item>
  </channel>
</rss>

