<?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 How can I write this as Set Anaylsis? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-can-I-write-this-as-Set-Anaylsis/m-p/188755#M51893</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;My question is like that: in the file ID is a key file. And each ID has 2 row of records. One row for gender, one row for class:&lt;/P&gt;&lt;P&gt;Gender: Male, Female and Not Disclosed&lt;/P&gt;&lt;P&gt;Class: 1, 2, 3, 4 ,5 and 6&lt;/P&gt;&lt;P&gt;The is a common term named: "Weight".&lt;/P&gt;&lt;P&gt;Therefore we have total Weight = 1 for all ID in Gender. And total Weight = 1 for all ID in Class.&lt;/P&gt;&lt;P&gt;Each ID has Weight between 0 to 1, and the weight figuare is same for Gender and Class.&lt;/P&gt;&lt;P&gt;My problem: How can I decompose different class according to Gender?&lt;/P&gt;&lt;P&gt;i.e. for Class 1, it's weight is 0.2, and I want a table to show that that 0.2 made up by 0.1 of Males and 0.05 of Famales and 0.05 and Not disclosed.&lt;/P&gt;&lt;P&gt;All data are time series. Therefore, the table I want will be:&lt;/P&gt;&lt;P&gt;Col1: Date,&lt;/P&gt;&lt;P&gt;Col2:Class,&lt;/P&gt;&lt;P&gt;Col3:weight of Class,&lt;/P&gt;&lt;P&gt;Col4: Weight of Class contributed by Males&lt;/P&gt;&lt;P&gt;Col5: Weight of Class contributed by Females&lt;/P&gt;&lt;P&gt;Col6:Weight of Class contributed by Not Disclose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thought?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Jun 2010 11:47:41 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-06-15T11:47:41Z</dc:date>
    <item>
      <title>How can I write this as Set Anaylsis?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-write-this-as-Set-Anaylsis/m-p/188755#M51893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;My question is like that: in the file ID is a key file. And each ID has 2 row of records. One row for gender, one row for class:&lt;/P&gt;&lt;P&gt;Gender: Male, Female and Not Disclosed&lt;/P&gt;&lt;P&gt;Class: 1, 2, 3, 4 ,5 and 6&lt;/P&gt;&lt;P&gt;The is a common term named: "Weight".&lt;/P&gt;&lt;P&gt;Therefore we have total Weight = 1 for all ID in Gender. And total Weight = 1 for all ID in Class.&lt;/P&gt;&lt;P&gt;Each ID has Weight between 0 to 1, and the weight figuare is same for Gender and Class.&lt;/P&gt;&lt;P&gt;My problem: How can I decompose different class according to Gender?&lt;/P&gt;&lt;P&gt;i.e. for Class 1, it's weight is 0.2, and I want a table to show that that 0.2 made up by 0.1 of Males and 0.05 of Famales and 0.05 and Not disclosed.&lt;/P&gt;&lt;P&gt;All data are time series. Therefore, the table I want will be:&lt;/P&gt;&lt;P&gt;Col1: Date,&lt;/P&gt;&lt;P&gt;Col2:Class,&lt;/P&gt;&lt;P&gt;Col3:weight of Class,&lt;/P&gt;&lt;P&gt;Col4: Weight of Class contributed by Males&lt;/P&gt;&lt;P&gt;Col5: Weight of Class contributed by Females&lt;/P&gt;&lt;P&gt;Col6:Weight of Class contributed by Not Disclose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thought?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jun 2010 11:47:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-write-this-as-Set-Anaylsis/m-p/188755#M51893</guid>
      <dc:creator />
      <dc:date>2010-06-15T11:47:41Z</dc:date>
    </item>
    <item>
      <title>How can I write this as Set Anaylsis?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-write-this-as-Set-Anaylsis/m-p/188756#M51894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, so you're using a generic database structure with field:value pairs? Something like this?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;LOAD * INLINE [&lt;BR /&gt;ID ,Field ,Value ,Weight&lt;BR /&gt;1 ,Gender ,Male ,.5&lt;BR /&gt;1 ,Class ,3 ,.7&lt;BR /&gt;2 ,Gender ,Female ,.1&lt;BR /&gt;2 ,Class ,3 ,.2&lt;BR /&gt;3 ,Gender ,Not Disclosed ,.4&lt;BR /&gt;3 ,Class ,3 ,.1&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;I'm not sure where date fits in, so I'm ignoring that.&lt;/P&gt;&lt;P&gt;I'd personally get rid of the field:value pairs and just make one row per ID with fields "Gender", "Class", "Gender Weight" and "Class Weight". But you don't have to, of course. Here's one approach:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Dimension = if(Field='Class',Value)&lt;BR /&gt;Expression 1 = sum({&amp;lt;Field={'Class'}&amp;gt;} Weight)&lt;BR /&gt;Expression 2 = sum({&amp;lt;Field={'Class'},ID=P({&amp;lt;Field={'Gender'},Value={'Male'}&amp;gt;})&amp;gt;} Weight)&lt;BR /&gt;Expression 2 = sum({&amp;lt;Field={'Class'},ID=P({&amp;lt;Field={'Gender'},Value={'Female'}&amp;gt;})&amp;gt;} Weight)&lt;BR /&gt;Expression 2 = sum({&amp;lt;Field={'Class'},ID=P({&amp;lt;Field={'Gender'},Value={'Not Disclosed'}&amp;gt;})&amp;gt;} Weight)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jun 2010 22:33:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-write-this-as-Set-Anaylsis/m-p/188756#M51894</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-06-15T22:33:36Z</dc:date>
    </item>
    <item>
      <title>How can I write this as Set Anaylsis?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-write-this-as-Set-Anaylsis/m-p/188757#M51895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your suggestion. I am away from the office and will test it later.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Manay thanks,&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 09:40:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-write-this-as-Set-Anaylsis/m-p/188757#M51895</guid>
      <dc:creator />
      <dc:date>2010-06-16T09:40:47Z</dc:date>
    </item>
  </channel>
</rss>

