<?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 Set analysis / Daily Vs MTD in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-Daily-Vs-MTD/m-p/156791#M32532</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;If anyone is interested I have actually managed to do this myself&lt;/P&gt;&lt;P&gt;let Sy =date(num(today()),'YYYY-MM-01');&lt;BR /&gt;let Sy1 =date(num(today()),'YYYY-MM-DD')-1;&lt;/P&gt;&lt;P&gt;LOAD [RD-ID],&lt;BR /&gt; dim_invoice_key,&lt;BR /&gt; cono,&lt;BR /&gt; warehouse,&lt;BR /&gt; invoice_no,&lt;BR /&gt; ConsolidatedInvoice,&lt;BR /&gt; invoice_date,&lt;BR /&gt; order_no,&lt;BR /&gt; order_line,&lt;BR /&gt; item_no,&lt;BR /&gt; source,&lt;BR /&gt; customer,&lt;BR /&gt; customer_class,&lt;BR /&gt; major_group,&lt;BR /&gt; minor_group,&lt;BR /&gt; item_div,&lt;BR /&gt; despatch_no,&lt;BR /&gt; direct_del_flag,&lt;BR /&gt; quantity,&lt;BR /&gt; sell_price,&lt;BR /&gt; cost,&lt;BR /&gt; margin,&lt;BR /&gt; [Sales Margin],&lt;BR /&gt; pref_supplier,&lt;BR /&gt; product_group,&lt;BR /&gt; promo_text,&lt;BR /&gt; opg_deal_version,&lt;BR /&gt; OPG_price,&lt;BR /&gt; OPG_percent,&lt;BR /&gt; OPGDeal_FrontEnd,&lt;BR /&gt; opg_supplier,&lt;BR /&gt; opg_comment,&lt;BR /&gt; opg_enduser,&lt;BR /&gt; opg_bundleid,&lt;BR /&gt; M_S,&lt;BR /&gt; reason_code,&lt;BR /&gt; credit_reason,&lt;BR /&gt; vat_number,&lt;BR /&gt; customer_name,&lt;BR /&gt; unit_price,&lt;BR /&gt; unit_cost,&lt;BR /&gt; salesperson,&lt;BR /&gt; team,&lt;BR /&gt; overgroup,&lt;BR /&gt; account_owners,&lt;BR /&gt; promo_text2,&lt;BR /&gt; backend_addback,&lt;BR /&gt; customer_rebate,&lt;BR /&gt; customer_rebate_provision,&lt;BR /&gt; pereferred_partner,&lt;BR /&gt; customer_order_ref,&lt;BR /&gt; gl_flag,&lt;BR /&gt; base_cost,&lt;BR /&gt; list_price,&lt;BR /&gt; updated,&lt;BR /&gt; base_list_price,&lt;BR /&gt; frontend_addback,&lt;BR /&gt; region_code,&lt;BR /&gt; period,&lt;BR /&gt; prod_manager,&lt;BR /&gt; type,&lt;BR /&gt; DD_PO_NO,&lt;BR /&gt; DD_PO_Line,&lt;BR /&gt; ProductManager,&lt;BR /&gt; line_value_prime,&lt;BR /&gt; vat_value_prime,&lt;BR /&gt; vat_code,&lt;BR /&gt; vat_rate,&lt;BR /&gt; currency_code,&lt;BR /&gt; mrupdated,&lt;BR /&gt; date_created,&lt;BR /&gt; left(invoice_no,1) as Query,&lt;BR /&gt; if(date(invoice_date,'YYYY-MM-DD') &amp;lt; $(Sy1),sell_price,0) as MTD,&lt;BR /&gt; if(date(invoice_date,'YYYY-MM-DD') = $(Sy1),sell_price,0) as TD,&lt;BR /&gt; if(date(invoice_date,'YYYY-MM-DD') &amp;lt; $(Sy1),(margin + backend_addback + frontend_addback),0) as MTDADJ,&lt;BR /&gt; if(date(invoice_date,'YYYY-MM-DD') = $(Sy1),(margin + backend_addback + frontend_addback),0) as TDADJ,&lt;BR /&gt; if(date(invoice_date,'YYYY-MM-DD') &amp;lt; $(Sy1),(IF(LEFT(invoice_no,1)='D',sell_price*0.03,0)),0) as MTDHIT,&lt;BR /&gt; if(date(invoice_date,'YYYY-MM-DD') = $(Sy1),(IF(LEFT(invoice_no,1)='D',sell_price*0.03,0)),0) as TDHIT&lt;BR /&gt;FROM&lt;BR /&gt;[\\HC-QLIKVIEW1\qvd\DataWH\RawData_Complete.qvd]&lt;BR /&gt;(qvd)&lt;/P&gt;&lt;P&gt;wHERE invoice_date&amp;gt;='$(Sy)';&lt;/P&gt;&lt;P&gt;The 2nd let defines the last days date and the if allows me to include or exclude days based upon it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will not work for weekend but you could manually adjust by adding -2 or by using netdays function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Nov 2009 14:45:02 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-11-26T14:45:02Z</dc:date>
    <item>
      <title>Set analysis / Daily Vs MTD</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Daily-Vs-MTD/m-p/156787#M32528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am a pretty novice user so if I am a little confused, please be nice J&lt;/P&gt;&lt;P&gt;I am trying to show our daily sales and our MTD (month to date) sales in the same pivot table in Qlickview.&lt;/P&gt;&lt;P&gt;I had made some progress using set analysis. I was forced to aggregate the set analysis to increase its flexibility.&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;aggr(sum({1-$} sell_price),major_group)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Major group are just a dimension against which we report)&lt;/P&gt;&lt;P&gt;We select the current day which show daily sales&lt;/P&gt;&lt;P&gt;The set analysis then shows the excluded data (i.e. the MTD figure)&lt;/P&gt;&lt;P&gt;This works perfectly, however the MTD figure (which is based on the set analysis formulae) is not performing correctly.&lt;/P&gt;&lt;P&gt;If any particular major group has not sold in the selected day, there is totally no reference, not even the MTD figure.&lt;/P&gt;&lt;P&gt;I can only conclude this is because the set analysis only includes those majors which have been picked up in the daily sales.&lt;/P&gt;&lt;P&gt;SO my two questions are this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this the case and is their any way around this?&lt;/P&gt;&lt;P&gt;How can I calculate/show a day and MTD total, if I can not resolve this issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 20:29:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Daily-Vs-MTD/m-p/156787#M32528</guid>
      <dc:creator />
      <dc:date>2009-11-18T20:29:34Z</dc:date>
    </item>
    <item>
      <title>Set analysis / Daily Vs MTD</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Daily-Vs-MTD/m-p/156788#M32529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Try doing something like Aggr ( Sum ( { $ &amp;lt; major_group={"*"} &amp;gt; } sell_price ) , major_group )&lt;/P&gt;&lt;P&gt;This should ensure you get the major groups back that are not automatically included in the standard analysis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 23:34:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Daily-Vs-MTD/m-p/156788#M32529</guid>
      <dc:creator />
      <dc:date>2009-11-18T23:34:47Z</dc:date>
    </item>
    <item>
      <title>Set analysis / Daily Vs MTD</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Daily-Vs-MTD/m-p/156789#M32530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nigel&lt;/P&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;I'll be honest; I only understand the basics of Set analysis but when I put your code in my MTD data simply mirror my daily data.&lt;/P&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;So I thought I give more information.&lt;/P&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="margin:auto auto auto 4.65pt;width:666pt;border-collapse:collapse;mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 5.4pt;" width="888"&gt;&lt;TBODY&gt;&lt;TR style="height:12.75pt;mso-yfti-irow:0;mso-yfti-firstrow:yes;"&gt;&lt;TD style="padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:whitesmoke;height:12.75pt;padding-top:0cm;mso-border-alt:solid gainsboro .5pt;mso-border-top-alt:solid gainsboro 1.0pt;border:gainsboro 1pt solid;" valign="bottom" width="99"&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0cm 0cm 0pt"&gt;Director&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:whitesmoke;height:12.75pt;border-top:gainsboro 1pt solid;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-top-alt:solid gainsboro 1.0pt;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0cm 0cm 0pt"&gt;PM&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:whitesmoke;height:12.75pt;border-top:gainsboro 1pt solid;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-top-alt:solid gainsboro 1.0pt;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro 1.0pt;" valign="bottom" width="99"&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0cm 0cm 0pt"&gt;major_group&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:gainsboro 1pt solid;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-alt:solid gainsboro .5pt;mso-border-left-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;MTD sell&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:gainsboro 1pt solid;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-top-alt:solid gainsboro .5pt;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;MTD adj&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:gainsboro 1pt solid;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-top-alt:solid gainsboro .5pt;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;MTD Credits&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:gainsboro 1pt solid;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-top-alt:solid gainsboro .5pt;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;Daily sales&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:gainsboro 1pt solid;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-top-alt:solid gainsboro .5pt;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;Daily Margin&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:gainsboro 1pt solid;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-top-alt:solid gainsboro .5pt;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;Daily credits&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;mso-yfti-irow:1;"&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:gainsboro 1pt solid;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;mso-border-left-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;Andy Dow&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;Adam Brind&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;BEL&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£1.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£1.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£1.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£1.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£1.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£1.00&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;mso-yfti-irow:2;"&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:gainsboro 1pt solid;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;mso-border-left-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;Andy Dow&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;Adam Brind&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;HDD&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£2.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£2.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£2.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£2.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£2.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£2.00&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;mso-yfti-irow:3;"&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:gainsboro 1pt solid;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;mso-border-left-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;Andy Dow&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;Adam Brind&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;MRY&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£3.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£3.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£3.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£3.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£3.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£3.00&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;mso-yfti-irow:4;"&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:gainsboro 1pt solid;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;mso-border-left-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;Andy Dow&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;Adam Brind&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;OTD&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£4.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£4.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£4.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£4.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£4.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£4.00&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;mso-yfti-irow:5;mso-yfti-lastrow:yes;"&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:gainsboro 1pt solid;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;mso-border-left-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;Andy Dow&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;Ashley Watts&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;"&gt;BTE&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£5.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£5.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£5.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£5.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£5.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-bottom:gainsboro 1pt solid;border-left:#d4d0c8;padding-bottom:0cm;padding-left:5.4pt;width:74pt;padding-right:5.4pt;background:white;height:12.75pt;border-top:#d4d0c8;border-right:gainsboro 1pt solid;padding-top:0cm;mso-border-bottom-alt:solid gainsboro .5pt;mso-border-right-alt:solid gainsboro .5pt;" valign="bottom" width="99"&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; text-align: right"&gt;£5.00&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="margin:0cm 0cm 10pt;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;My set analysis is always based on at least three dimensions the main one being major. (PS: I have cleansed the data to reflect the low figures - *company policy*)&lt;/P&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;Perhaps your suggestion would work if you'd or anyone else be kind enough to explain the logic behind it.&lt;/P&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2009 00:26:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Daily-Vs-MTD/m-p/156789#M32530</guid>
      <dc:creator />
      <dc:date>2009-11-19T00:26:54Z</dc:date>
    </item>
    <item>
      <title>Set analysis / Daily Vs MTD</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Daily-Vs-MTD/m-p/156790#M32531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So is this based on the current date? Something like this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Daily sales: sum({&amp;lt;Date={'$(=today())'}&amp;gt;} Sales)&lt;BR /&gt;MTD sell: sum({Date={"&amp;gt;=$(=monthstart(today())) &amp;lt;=$(=today())"}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;You may need to format today() and monthstart(today()) if your Date field uses a different format than you've set up as the default.&lt;/P&gt;&lt;P&gt;The attached isn't this solution. It's from the response I prepared before I saw your sample chart. I'm including it anyway in case it's helpful in some way, even though it looks like it isn't what you want. In the below response, I comment that set analysis won't work for MTD, and yet I use it in the response above. The reason it works in the response above is that you're only showing ONE date in the chart, not multiple dates. Anyway, here's my old response:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;"OK, so you have a chart with the day as a dimension. Then you have sum(sell_price) as an expression for the day's sales. Now you want an expression for the month to date sales for that day, and you want to see it even when there were no sales for that day?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;First, set analysis executes outside of the context of the current row of the table. It executes once for the whole table. So if you write your month to date sale expression as set analysis, it won't return expected results.&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Second, the dates with no data disappearing has nothing to do with set analysis. It is a feature of QlikView that combinations of dimensions for which there are no data are simply not displayed. That's normally exactly what you want, but can become an annoyance when dealing with dates or other continuous dimensions. One common solution is to add a "date island" disconnected from your date with all dates of interest. Then you connect it to your actual dates in the expression with an IF statement. Unfortunately, the chart is then slow to execute if you have a large data set.&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;See the attached application for a pivot table doing what it sounds like you want. It uses these expressions:&lt;/P&gt;&lt;P style="padding-left:60px;"&gt;Sales for Day: sum(if("Sales Date"="Date","Sales"))&lt;BR /&gt;MTD Sales: rangesum("Sales for Day",above("MTD Sales"))&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;If that's not what you're trying to do, and your use of aggr() and {1-$} makes me think perhaps it isn't, can you post some example data and desired results, or a sample QlikView application demonstrating the problem and desired solution?"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2009 01:40:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Daily-Vs-MTD/m-p/156790#M32531</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-11-19T01:40:36Z</dc:date>
    </item>
    <item>
      <title>Set analysis / Daily Vs MTD</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Daily-Vs-MTD/m-p/156791#M32532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;If anyone is interested I have actually managed to do this myself&lt;/P&gt;&lt;P&gt;let Sy =date(num(today()),'YYYY-MM-01');&lt;BR /&gt;let Sy1 =date(num(today()),'YYYY-MM-DD')-1;&lt;/P&gt;&lt;P&gt;LOAD [RD-ID],&lt;BR /&gt; dim_invoice_key,&lt;BR /&gt; cono,&lt;BR /&gt; warehouse,&lt;BR /&gt; invoice_no,&lt;BR /&gt; ConsolidatedInvoice,&lt;BR /&gt; invoice_date,&lt;BR /&gt; order_no,&lt;BR /&gt; order_line,&lt;BR /&gt; item_no,&lt;BR /&gt; source,&lt;BR /&gt; customer,&lt;BR /&gt; customer_class,&lt;BR /&gt; major_group,&lt;BR /&gt; minor_group,&lt;BR /&gt; item_div,&lt;BR /&gt; despatch_no,&lt;BR /&gt; direct_del_flag,&lt;BR /&gt; quantity,&lt;BR /&gt; sell_price,&lt;BR /&gt; cost,&lt;BR /&gt; margin,&lt;BR /&gt; [Sales Margin],&lt;BR /&gt; pref_supplier,&lt;BR /&gt; product_group,&lt;BR /&gt; promo_text,&lt;BR /&gt; opg_deal_version,&lt;BR /&gt; OPG_price,&lt;BR /&gt; OPG_percent,&lt;BR /&gt; OPGDeal_FrontEnd,&lt;BR /&gt; opg_supplier,&lt;BR /&gt; opg_comment,&lt;BR /&gt; opg_enduser,&lt;BR /&gt; opg_bundleid,&lt;BR /&gt; M_S,&lt;BR /&gt; reason_code,&lt;BR /&gt; credit_reason,&lt;BR /&gt; vat_number,&lt;BR /&gt; customer_name,&lt;BR /&gt; unit_price,&lt;BR /&gt; unit_cost,&lt;BR /&gt; salesperson,&lt;BR /&gt; team,&lt;BR /&gt; overgroup,&lt;BR /&gt; account_owners,&lt;BR /&gt; promo_text2,&lt;BR /&gt; backend_addback,&lt;BR /&gt; customer_rebate,&lt;BR /&gt; customer_rebate_provision,&lt;BR /&gt; pereferred_partner,&lt;BR /&gt; customer_order_ref,&lt;BR /&gt; gl_flag,&lt;BR /&gt; base_cost,&lt;BR /&gt; list_price,&lt;BR /&gt; updated,&lt;BR /&gt; base_list_price,&lt;BR /&gt; frontend_addback,&lt;BR /&gt; region_code,&lt;BR /&gt; period,&lt;BR /&gt; prod_manager,&lt;BR /&gt; type,&lt;BR /&gt; DD_PO_NO,&lt;BR /&gt; DD_PO_Line,&lt;BR /&gt; ProductManager,&lt;BR /&gt; line_value_prime,&lt;BR /&gt; vat_value_prime,&lt;BR /&gt; vat_code,&lt;BR /&gt; vat_rate,&lt;BR /&gt; currency_code,&lt;BR /&gt; mrupdated,&lt;BR /&gt; date_created,&lt;BR /&gt; left(invoice_no,1) as Query,&lt;BR /&gt; if(date(invoice_date,'YYYY-MM-DD') &amp;lt; $(Sy1),sell_price,0) as MTD,&lt;BR /&gt; if(date(invoice_date,'YYYY-MM-DD') = $(Sy1),sell_price,0) as TD,&lt;BR /&gt; if(date(invoice_date,'YYYY-MM-DD') &amp;lt; $(Sy1),(margin + backend_addback + frontend_addback),0) as MTDADJ,&lt;BR /&gt; if(date(invoice_date,'YYYY-MM-DD') = $(Sy1),(margin + backend_addback + frontend_addback),0) as TDADJ,&lt;BR /&gt; if(date(invoice_date,'YYYY-MM-DD') &amp;lt; $(Sy1),(IF(LEFT(invoice_no,1)='D',sell_price*0.03,0)),0) as MTDHIT,&lt;BR /&gt; if(date(invoice_date,'YYYY-MM-DD') = $(Sy1),(IF(LEFT(invoice_no,1)='D',sell_price*0.03,0)),0) as TDHIT&lt;BR /&gt;FROM&lt;BR /&gt;[\\HC-QLIKVIEW1\qvd\DataWH\RawData_Complete.qvd]&lt;BR /&gt;(qvd)&lt;/P&gt;&lt;P&gt;wHERE invoice_date&amp;gt;='$(Sy)';&lt;/P&gt;&lt;P&gt;The 2nd let defines the last days date and the if allows me to include or exclude days based upon it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will not work for weekend but you could manually adjust by adding -2 or by using netdays function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2009 14:45:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Daily-Vs-MTD/m-p/156791#M32532</guid>
      <dc:creator />
      <dc:date>2009-11-26T14:45:02Z</dc:date>
    </item>
    <item>
      <title>Set analysis / Daily Vs MTD</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Daily-Vs-MTD/m-p/156792#M32533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm also trying to do the same... but my YEAR and MONTH are separated in 2 columns as digit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum ({$&amp;lt;YEAR={'$(=YEAR(today()))','$(=YEAR(today())-1), , MONTH={'&amp;gt;=$(=month(yearstart(today()))) &amp;lt;=$(=month(today()-1))'}} &amp;gt;} Sales)/1000&lt;/P&gt;&lt;P&gt;I wanted to see YTD &amp;amp; MTD for this n last year. when user select year or month, the data should not change at all.&lt;/P&gt;&lt;P&gt;Any help? Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Aug 2010 08:47:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Daily-Vs-MTD/m-p/156792#M32533</guid>
      <dc:creator />
      <dc:date>2010-08-31T08:47:23Z</dc:date>
    </item>
  </channel>
</rss>

