<?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 Start with set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Start-with-set-analysis/m-p/583822#M216759</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A few months ago I created an application for monitoring of machine efficiency in our machine shop. I display it as calculated expression of the chart. Right now it works the way, that user have to select specific day otherwise incorrect data are displayed. Now I would like to modify the application to always display corect data and chart for current selection(e.g. for whole week, month etc.). I have checked QV forums and possibilities and the best way which I found are set analysis. I have only basic knowledge and skills of QV right now so I'm afraid it is out of my league and I would really appriciate your help. The most complicated part for me is how to use set analysis together with if conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current code:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;((if(((max(WorkingTimeDay))-(sum(if(DownTime=1,ActivityMinuteDiff,0))))=0,0,((sum(ProductionTime))/((max(WorkingTimeDay))-(sum(if(DownTime=1,ActivityMinuteDiff,0)))))))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;*&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(if((sum(if(ContractFirstRow=1,PPVReal,0)))=0,0,((sum(if(ContractFirstRow=1,ProductTotal,0)))/(sum(if(ContractFirstRow=1,PPVReal,0))))))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;*&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(if((sum(if(ContractFirstRow=1,ProductTotal,0)))=0,0,((sum(if(ContractFirstRow=1,Product,0)))/(sum(if(ContractFirstRow=1,ProductTotal,0)))))))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance for any tips or advises.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jan 2014 14:14:57 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-01-29T14:14:57Z</dc:date>
    <item>
      <title>Start with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Start-with-set-analysis/m-p/583822#M216759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A few months ago I created an application for monitoring of machine efficiency in our machine shop. I display it as calculated expression of the chart. Right now it works the way, that user have to select specific day otherwise incorrect data are displayed. Now I would like to modify the application to always display corect data and chart for current selection(e.g. for whole week, month etc.). I have checked QV forums and possibilities and the best way which I found are set analysis. I have only basic knowledge and skills of QV right now so I'm afraid it is out of my league and I would really appriciate your help. The most complicated part for me is how to use set analysis together with if conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current code:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;((if(((max(WorkingTimeDay))-(sum(if(DownTime=1,ActivityMinuteDiff,0))))=0,0,((sum(ProductionTime))/((max(WorkingTimeDay))-(sum(if(DownTime=1,ActivityMinuteDiff,0)))))))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;*&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(if((sum(if(ContractFirstRow=1,PPVReal,0)))=0,0,((sum(if(ContractFirstRow=1,ProductTotal,0)))/(sum(if(ContractFirstRow=1,PPVReal,0))))))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;*&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(if((sum(if(ContractFirstRow=1,ProductTotal,0)))=0,0,((sum(if(ContractFirstRow=1,Product,0)))/(sum(if(ContractFirstRow=1,ProductTotal,0)))))))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance for any tips or advises.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 14:14:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Start-with-set-analysis/m-p/583822#M216759</guid>
      <dc:creator />
      <dc:date>2014-01-29T14:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: Start with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Start-with-set-analysis/m-p/583823#M216760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Petr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is just an example of what you could do&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;((if(((max(WorkingTimeDay))-(sum(if(DownTime=1,ActivityMinuteDiff,0))))=0,0,((sum(ProductionTime))/((max(WorkingTimeDay))-(sum(if(DownTime=1,ActivityMinuteDiff,0)))))))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;becomes&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;((if(((max(WorkingTimeDay))-(sum({&amp;lt;DownTime&amp;gt;}={"1"} ActivityMinuteDiff)))=0,0,((sum(ProductionTime))/((max(WorkingTimeDay))-(sum({&amp;lt;DownTime&amp;gt;}={"1"} ActivityMinuteDiff))))))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it's a complex one so it is better to make it step by step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use IF and SET ANALYSS together&amp;nbsp; (..; or not...up to you)&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 14:32:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Start-with-set-analysis/m-p/583823#M216760</guid>
      <dc:creator />
      <dc:date>2014-01-29T14:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Start with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Start-with-set-analysis/m-p/583824#M216761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Petr, what can be calculated in the load script? The more you can calculate there, the more clear your expression can be (= less if statements and/or dimensions).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(((max(WorkingTimeDay))-(sum(if(DownTime &lt;/EM&gt;can be calculated in the script to 1 dimension, for instance WTDDT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then it would be if(WTDDT = 1, ActivityMInyteDiff, 0) ......&lt;/P&gt;&lt;P&gt;etc. etc.&lt;/P&gt;&lt;P&gt;Also try combining if statements in your load script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 14:33:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Start-with-set-analysis/m-p/583824#M216761</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2014-01-29T14:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Start with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Start-with-set-analysis/m-p/583825#M216762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;Thanks to this website: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://tools.qlikblog.at/SetAnalysisWizard/Set-Analysis-Example--Indirect-Set-Analysis.aspx"&gt;http://tools.qlikblog.at/SetAnalysisWizard/Set-Analysis-Example--Indirect-Set-Analysis.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VERY USEFUL &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://tools.qlikblog.at/SetAnalysisWizard/QlikView-SetAnalysis_Wizard_and_Generator.aspx?sa=_001"&gt;http://tools.qlikblog.at/SetAnalysisWizard/QlikView-SetAnalysis_Wizard_and_Generator.aspx?sa=_001&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set Analysis Examples - Indirect Set Modifiers/Indirect Set Analysis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These examples demonstrate the advanced technique of indirect sets.&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;Returns the Sum of Sales for the current selection, but only for those customers that have bought the product "Shoe".&lt;/P&gt;&lt;P&gt;(This is one of the examples of the "QlikView Help").&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Customer=P({1&amp;lt;Product={'Shoe'}&amp;gt;}Customer)&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open Wizard&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;Return the Sum of Sales for the current selection, but only for those customers who have ever supplied the product "Shoe".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Customer=P({1&amp;lt;Product={'Shoe'}&amp;gt;}Supplier)&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open Wizard&lt;/P&gt;&lt;P&gt;© qlikblog.at / Stefan Walther 2013 ~&amp;nbsp; "Set Analysis Wizard for QlikView" Version 0.5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have fun&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 14:37:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Start-with-set-analysis/m-p/583825#M216762</guid>
      <dc:creator />
      <dc:date>2014-01-29T14:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Start with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Start-with-set-analysis/m-p/583826#M216763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok guys thank you for your answers. I will try to apply your tips and we will see.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 13:02:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Start-with-set-analysis/m-p/583826#M216763</guid>
      <dc:creator />
      <dc:date>2014-01-30T13:02:46Z</dc:date>
    </item>
  </channel>
</rss>

