<?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 Simulation with Calculated variable in Set Analysis in Graphics in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Simulation-with-Calculated-variable-in-Set-Analysis-in-Graphics/m-p/203527#M500126</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a big challenge for my client.&lt;/P&gt;&lt;P&gt;We want use a dashboard for Simuations.&lt;/P&gt;&lt;P&gt;My indicator is a pyramid of age for Humans Ressources.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a filter Date, a table collabs, and a table Groups Age (Label, ID, Min Age, Max Age).&lt;/P&gt;&lt;P&gt;I want construct a pyramid where I can see the evolution of my collabs changing the Date.&lt;/P&gt;&lt;P&gt;I calcul their new age with a formule :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;SET vAge_Date =floor((floor(((Date - [Date naissance])/365)*12) + 0.49999)/12);&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I don't see why I can found the formule where I can construct my pyramid of age (It's a Histogram Graph) with my dimension Groups Age.&lt;/P&gt;&lt;P&gt;I have try with this formule but it's not wroks &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;count($(vSetACollabPrésent) DISTINCT IF($(vAge_Date)&amp;gt; FieldValue('Min',1) AND $(vAge_Date)&amp;lt;= FieldValue('Max',1) ,MatriculeCollab))&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Can you help me please?&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Bruno&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Apr 2011 14:57:49 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-07T14:57:49Z</dc:date>
    <item>
      <title>Simulation with Calculated variable in Set Analysis in Graphics</title>
      <link>https://community.qlik.com/t5/QlikView/Simulation-with-Calculated-variable-in-Set-Analysis-in-Graphics/m-p/203527#M500126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a big challenge for my client.&lt;/P&gt;&lt;P&gt;We want use a dashboard for Simuations.&lt;/P&gt;&lt;P&gt;My indicator is a pyramid of age for Humans Ressources.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a filter Date, a table collabs, and a table Groups Age (Label, ID, Min Age, Max Age).&lt;/P&gt;&lt;P&gt;I want construct a pyramid where I can see the evolution of my collabs changing the Date.&lt;/P&gt;&lt;P&gt;I calcul their new age with a formule :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;SET vAge_Date =floor((floor(((Date - [Date naissance])/365)*12) + 0.49999)/12);&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I don't see why I can found the formule where I can construct my pyramid of age (It's a Histogram Graph) with my dimension Groups Age.&lt;/P&gt;&lt;P&gt;I have try with this formule but it's not wroks &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;count($(vSetACollabPrésent) DISTINCT IF($(vAge_Date)&amp;gt; FieldValue('Min',1) AND $(vAge_Date)&amp;lt;= FieldValue('Max',1) ,MatriculeCollab))&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Can you help me please?&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Bruno&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2011 14:57:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simulation-with-Calculated-variable-in-Set-Analysis-in-Graphics/m-p/203527#M500126</guid>
      <dc:creator />
      <dc:date>2011-04-07T14:57:49Z</dc:date>
    </item>
    <item>
      <title>Simulation with Calculated variable in Set Analysis in Graphics</title>
      <link>https://community.qlik.com/t5/QlikView/Simulation-with-Calculated-variable-in-Set-Analysis-in-Graphics/m-p/203528#M500127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you put this statement in the script:&lt;/P&gt;&lt;PRE style="margin:0px;"&gt;SET vAge_Date =floor((floor(((Date - [Date naissance])/365)*12) + 0.49999)/12);&lt;BR /&gt;&lt;BR /&gt;It sets vAge_Date to whatever the solution is using all of the dates in [Date naissance] and it won't change based on your selection.&lt;BR /&gt;&lt;BR /&gt;I've never used FieldValue( before but I think that getfieldselections( might work for you but I don't think that would solve all your problems...&lt;BR /&gt;&lt;BR /&gt;One thing you could try is doing something like...&lt;BR /&gt;&lt;BR /&gt;LOAD [Label],[ID], min([Age]) as 'Min Age', max([Age]) as 'Max Age'&lt;BR /&gt;RESIDENT sometable&lt;BR /&gt;GROUP BY [ID],[Age];&lt;BR /&gt;&lt;BR /&gt;And do like count(distinct aggr(if([Date naissance]=[Min Date],[ID]),[ID]))&lt;BR /&gt;&lt;BR /&gt;(I'm assuming [Date naissance] means the day they were born?&lt;BR /&gt;I don't know if the aggr is right or if it's even necessary but I put it there anyway.&lt;BR /&gt;&lt;BR /&gt;But I'm having a hard time understanding exactly what you want to do so... it's possible nothing I said is helpful&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2011 16:22:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simulation-with-Calculated-variable-in-Set-Analysis-in-Graphics/m-p/203528#M500127</guid>
      <dc:creator />
      <dc:date>2011-04-07T16:22:28Z</dc:date>
    </item>
  </channel>
</rss>

