<?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: Sort chart on weekday untill today in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sort-chart-on-weekday-untill-today/m-p/842460#M657765</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using this for the 1st column:&lt;BR /&gt;count(distinct if(Date&amp;gt;=ReloadTime()-7, OrderID))&lt;BR /&gt;2nd column:&lt;BR /&gt;avg(OrderID)&lt;/P&gt;&lt;P&gt;If I got the request wrong - could you please upload the app?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 May 2015 12:38:58 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-05-12T12:38:58Z</dc:date>
    <item>
      <title>Sort chart on weekday untill today</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-chart-on-weekday-untill-today/m-p/842459#M657764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Hello all,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;I have a problem with one of my charts. I have been looking for hours but can't find what i need (some variations, but nothing that really works).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;I want a chart with weekday as dimension and 2 expressions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;the first expression is the amount of orders I had in the last 7 days per day. I do this with "count({&amp;lt;Date = {"&amp;gt;=$(=Date('13-03-2014'-6))&amp;lt;=$(=Date(Date('13-03-2014')))"}&amp;gt;} OrderID)" (I have to work with an old database for creation. In this "13-03-2014" is the last entry so I take that as today)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;The second expression is the average orders on those days in the selected period (for instance if I select 2013, it will show the average orders over all of 2013 per day.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;In a table this should be something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;P&gt;&lt;STRONG&gt;Expression 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(amount of orders last 7 days)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(For example from 07-03 untill 13-03)&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;P&gt;Expression 2&lt;/P&gt;&lt;P&gt;(average amount of orders in selected periode)&lt;/P&gt;&lt;P&gt;(For example the entire year 2013)&lt;/P&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Friday (07-03-2014)&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;32&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;28&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Saterday (08-03-2014)&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;60&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Sunday (09-03-2014)&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;59&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;54&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Monday (10-03-2014)&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;28&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Tuesday (11-03-2014 (before last))&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;31&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;26&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Wednesday (12-03-2014 (yesterday))&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;29&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Thursday (13-03-2014 (today))&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;33&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;28&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;The problem is that both expressions only show the data from that week or both expressions show data from everything I have selected. But not Expression 1 only from last week and expression 2 from the selected period.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Can anyone help me please?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2015 12:12:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-chart-on-weekday-untill-today/m-p/842459#M657764</guid>
      <dc:creator />
      <dc:date>2015-05-12T12:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sort chart on weekday untill today</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-chart-on-weekday-untill-today/m-p/842460#M657765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using this for the 1st column:&lt;BR /&gt;count(distinct if(Date&amp;gt;=ReloadTime()-7, OrderID))&lt;BR /&gt;2nd column:&lt;BR /&gt;avg(OrderID)&lt;/P&gt;&lt;P&gt;If I got the request wrong - could you please upload the app?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2015 12:38:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-chart-on-weekday-untill-today/m-p/842460#M657765</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-12T12:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: Sort chart on weekday untill today</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-chart-on-weekday-untill-today/m-p/842461#M657766</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: Arial, sans-serif; font-size: 13.3333330154419px;"&gt;I want a chart with weekday as dimension and 2 expressions&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Did you create a Weekday field in the script? Or is that chart dimension a date field? I suspect the latter. If so, you try to create a WeekDay field using the WeekDay function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may want to map the weekday numbers to names with a small inline mapping table and the applymap function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2015 12:43:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-chart-on-weekday-untill-today/m-p/842461#M657766</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-05-12T12:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Sort chart on weekday untill today</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-chart-on-weekday-untill-today/m-p/842462#M657767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Thanks for the help! With some minor changes it worked well! Thanks again!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Expression 1:&lt;/P&gt;&lt;P&gt;= count({1}DISTINCT if(Date&amp;gt;=Date('13-03-2014')-6 and Date&amp;lt;=Date('13-03-2014'), OrderID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression 2:&lt;/P&gt;&lt;P&gt;=num(count(OrderID) / count( distinct if(OrderID&amp;gt;0, weeknumber &amp;amp; YYYY)),'#.###,##')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension:&lt;BR /&gt;= Weekday&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2015 09:54:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-chart-on-weekday-untill-today/m-p/842462#M657767</guid>
      <dc:creator />
      <dc:date>2015-05-18T09:54:36Z</dc:date>
    </item>
  </channel>
</rss>

