<?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 for date range in bar graph in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-for-date-range-in-bar-graph/m-p/1315122#M408380</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having trouble getting accurate results using set analysis for a date range in a bar graph.&lt;/P&gt;&lt;P&gt;Results are good in a chart with the use of an if statement, but this does not produce the correct result when converted to a bar graph - hence the need to use set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement works in a chart:&lt;/P&gt;&lt;P&gt;if (RevenueRecognisedFiscDate &amp;gt;= Date#(vFromDate) and RevenueRecognisedFiscDate &amp;lt;=Date#(vToDate) ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;[CategoryCode]={'EREV'},[Fiscal Year],[Selected Fiscal Month] &amp;gt;}&amp;nbsp; [ActualCost])*-1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement does not work? A result is produced but not the right one.&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;RevenueRecognisedFiscDate={"&amp;gt;=$(vFromDate)"} , RevenueRecognisedFiscDate={"&amp;lt;$(vToDate)"},&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [CategoryCode]={'EREV'},[Fiscal Year],[Selected Fiscal Month] &amp;gt;} ActualCost) * -1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried any conversion of the date i can find but have not ended up with the right result.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;RevenueRecognisedFiscDate is a Date field in the Load statement and vFromDate and vToDate are declared as :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;vFromDate=Date#(Min([Fiscal Period]),'YYYYMM')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;vToDate=Date#(Min([Fiscal Period]),'YYYYMM')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Does anyone have any other ideas to get the right result in a bar chart?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Mar 2017 00:48:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-03-31T00:48:59Z</dc:date>
    <item>
      <title>Set analysis for date range in bar graph</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-for-date-range-in-bar-graph/m-p/1315122#M408380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having trouble getting accurate results using set analysis for a date range in a bar graph.&lt;/P&gt;&lt;P&gt;Results are good in a chart with the use of an if statement, but this does not produce the correct result when converted to a bar graph - hence the need to use set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement works in a chart:&lt;/P&gt;&lt;P&gt;if (RevenueRecognisedFiscDate &amp;gt;= Date#(vFromDate) and RevenueRecognisedFiscDate &amp;lt;=Date#(vToDate) ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;[CategoryCode]={'EREV'},[Fiscal Year],[Selected Fiscal Month] &amp;gt;}&amp;nbsp; [ActualCost])*-1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement does not work? A result is produced but not the right one.&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;RevenueRecognisedFiscDate={"&amp;gt;=$(vFromDate)"} , RevenueRecognisedFiscDate={"&amp;lt;$(vToDate)"},&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [CategoryCode]={'EREV'},[Fiscal Year],[Selected Fiscal Month] &amp;gt;} ActualCost) * -1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried any conversion of the date i can find but have not ended up with the right result.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;RevenueRecognisedFiscDate is a Date field in the Load statement and vFromDate and vToDate are declared as :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;vFromDate=Date#(Min([Fiscal Period]),'YYYYMM')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;vToDate=Date#(Min([Fiscal Period]),'YYYYMM')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Does anyone have any other ideas to get the right result in a bar chart?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2017 00:48:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-for-date-range-in-bar-graph/m-p/1315122#M408380</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-31T00:48:59Z</dc:date>
    </item>
  </channel>
</rss>

