<?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: Concatenating values from different tables for a dimension for measure calculation. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Concatenating-values-from-different-tables-for-a-dimension-for/m-p/1756648#M58360</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/124985"&gt;@tas_taba1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try adding Race to your aggr function call , something like this&lt;/P&gt;&lt;P&gt;=sqrt(Sum(ALL Aggr(&lt;/P&gt;&lt;P&gt;Sqr(Sum(UtilityWt)-(Sum(TOTAL &amp;lt;CinemaStratum&amp;gt; UtilityWt)/Count(DISTINCT ALL &amp;lt;CinemaStratum&amp;gt; CinemaPSU))) * (Count(DISTINCT ALL &amp;lt;CinemaStratum&amp;gt; CinemaPSU)/(Count(DISTINCT ALL &amp;lt;CinemaStratum&amp;gt; CinemaPSU)-1))&lt;/P&gt;&lt;P&gt;, Race,CinemaPSU, CinemaStratum)))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Wed, 28 Oct 2020 12:56:57 GMT</pubDate>
    <dc:creator>forte</dc:creator>
    <dc:date>2020-10-28T12:56:57Z</dc:date>
    <item>
      <title>Concatenating values from different tables for a dimension for measure calculation.</title>
      <link>https://community.qlik.com/t5/App-Development/Concatenating-values-from-different-tables-for-a-dimension-for/m-p/1751135#M57823</link>
      <description>&lt;P&gt;Dear Altruists,&lt;/P&gt;&lt;P&gt;I have stumbled upon this problem in my application and was hoping any of you wise people could help me out.&lt;/P&gt;&lt;P&gt;I have this dataset with following fields-&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dataset" style="width: 907px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/42005i90C298E5B18D94F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="dataset.JPG" alt="dataset" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;dataset&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I use the fields CinemaStratum, CinemaPSU and UtilityWt to calculate standard errors-&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="output1" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/42006i99BD11969DB2916F/image-size/large?v=v2&amp;amp;px=999" role="button" title="output1.JPG" alt="output1" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;output1&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It is giving me the correct SE for the whole dataset. And if I use a filter pane with the required dimension e.g. race it is also showing the correct result for a particular selection like this-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="output2" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/42017i7B7655DCFAA498AD/image-size/large?v=v2&amp;amp;px=999" role="button" title="output2.JPG" alt="output2" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;output2&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But if I create a separate table with &lt;STRONG&gt;race&lt;/STRONG&gt; as the &lt;STRONG&gt;dimension&lt;/STRONG&gt; and &lt;STRONG&gt;SE&lt;/STRONG&gt; the &lt;STRONG&gt;measure&lt;/STRONG&gt;,&amp;nbsp;it is not giving the correct row by row result for each of the race values-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="wrong_result" style="width: 452px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/42012i3A073E97496055CA/image-size/large?v=v2&amp;amp;px=999" role="button" title="wrong_result.jpg" alt="wrong_result" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;wrong_result&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Because now it is not taking into account some of the stratums and PSUs whose value does not exist for a particular race type. But I want all the stratums/psus to be considered and their respective values to be '0' if it does not exist for that field. The expression I am using for SE calculation is-&lt;/P&gt;&lt;P&gt;'&lt;EM&gt;sqrt(Sum(ALL Aggr(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sqr(Sum(UtilityWt)-(Sum(TOTAL &amp;lt;CinemaStratum&amp;gt; UtilityWt)/Count(DISTINCT ALL &amp;lt;CinemaStratum&amp;gt; CinemaPSU))) * (Count(DISTINCT ALL &amp;lt;CinemaStratum&amp;gt; CinemaPSU)/(Count(DISTINCT ALL &amp;lt;CinemaStratum&amp;gt; CinemaPSU)-1))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;, CinemaPSU, CinemaStratum)))&lt;/EM&gt;'&lt;/P&gt;&lt;P&gt;This is the table I am looking for-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="correct_result" style="width: 272px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/42016i2AD13A821CD98634/image-size/large?v=v2&amp;amp;px=999" role="button" title="correct_result.JPG" alt="correct_result" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;correct_result&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I want the all the stratums/psu to be included for measure calculations regardless of the selected dimension.&lt;/P&gt;&lt;P&gt;I am attaching my application as well. If anyone can give any insight or share their valuable inputs, it would be great! Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:19:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Concatenating-values-from-different-tables-for-a-dimension-for/m-p/1751135#M57823</guid>
      <dc:creator>tas_taba1</dc:creator>
      <dc:date>2024-11-16T01:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating values from different tables for a dimension for measure calculation.</title>
      <link>https://community.qlik.com/t5/App-Development/Concatenating-values-from-different-tables-for-a-dimension-for/m-p/1756648#M58360</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/124985"&gt;@tas_taba1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try adding Race to your aggr function call , something like this&lt;/P&gt;&lt;P&gt;=sqrt(Sum(ALL Aggr(&lt;/P&gt;&lt;P&gt;Sqr(Sum(UtilityWt)-(Sum(TOTAL &amp;lt;CinemaStratum&amp;gt; UtilityWt)/Count(DISTINCT ALL &amp;lt;CinemaStratum&amp;gt; CinemaPSU))) * (Count(DISTINCT ALL &amp;lt;CinemaStratum&amp;gt; CinemaPSU)/(Count(DISTINCT ALL &amp;lt;CinemaStratum&amp;gt; CinemaPSU)-1))&lt;/P&gt;&lt;P&gt;, Race,CinemaPSU, CinemaStratum)))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 12:56:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Concatenating-values-from-different-tables-for-a-dimension-for/m-p/1756648#M58360</guid>
      <dc:creator>forte</dc:creator>
      <dc:date>2020-10-28T12:56:57Z</dc:date>
    </item>
  </channel>
</rss>

