<?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 sas va key value object if no count how to display zero in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/sas-va-key-value-object-if-no-count-how-to-display-zero/m-p/813170#M16039</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am using key value object and sector having the product count(measure) so it will display the name and count some sector does not have any count in that case sector name not appearing and also no count as zero.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
    <pubDate>Fri, 13 May 2022 10:39:56 GMT</pubDate>
    <dc:creator>vallsas</dc:creator>
    <dc:date>2022-05-13T10:39:56Z</dc:date>
    <item>
      <title>sas va key value object if no count how to display zero</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/sas-va-key-value-object-if-no-count-how-to-display-zero/m-p/813170#M16039</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am using key value object and sector having the product count(measure) so it will display the name and count some sector does not have any count in that case sector name not appearing and also no count as zero.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 10:39:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/sas-va-key-value-object-if-no-count-how-to-display-zero/m-p/813170#M16039</guid>
      <dc:creator>vallsas</dc:creator>
      <dc:date>2022-05-13T10:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: sas va key value object if no count how to display zero</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/sas-va-key-value-object-if-no-count-how-to-display-zero/m-p/813467#M16046</link>
      <description>&lt;P&gt;If the row does not exist, there's no direct way to solve it directly I guess.&lt;/P&gt;
&lt;P&gt;BUT you could produce a cartesian product inside Visual Analytics by using the join option several times.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The grey cross table is the crossings in your table, the yellow ones are aggregated tables that are joined twice to produce the desired output (green).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The last joined table creates a calculated item if aggregated frequency is missing then 0, else aggregated frequency.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pic.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71454i29B353B83046FFBF/image-size/large?v=v2&amp;amp;px=999" role="button" title="pic.png" alt="pic.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;here the BIRD code from the VA (ctrl + ALT + b)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;       &amp;lt;DataSource label="ALL_MIGRATION_CT2_AGGREGATED (1)" type="relational" name="ds198"&amp;gt;
            &amp;lt;GeneratedResource type="standalone" resource="ge197" generator="dd194" source="ds7" lifetime="executor" externalReferenceName="cas-shared-defaultPublicALL_MIGRATION_CT2producto"/&amp;gt;
            &amp;lt;BusinessItemFolder&amp;gt;
                &amp;lt;GeneratedDataItem root="bi196" name="bi200" label="producto" xref="producto" usage="categorical" format="$."/&amp;gt;
                &amp;lt;PredefinedDataItem calculation="totalCount" name="bi201" label="Frequency" usage="quantitative" format="COMMA12."/&amp;gt;
                &amp;lt;PredefinedDataItem calculation="totalCountPercent" name="bi202" label="Frequency Percent" usage="quantitative" format="PERCENT20.2"/&amp;gt;
                &amp;lt;GeneratedDataItem root="bi214" name="bi217" label="join_criteria" xref="calculation" usage="categorical" format="$."/&amp;gt;
            &amp;lt;/BusinessItemFolder&amp;gt;
        &amp;lt;/DataSource&amp;gt;
        &amp;lt;DataSource label="ALL_MIGRATION_CT2_AGGREGATED" type="relational" name="ds185"&amp;gt;
            &amp;lt;GeneratedResource type="standalone" resource="ge175" generator="dd172" source="ds7" lifetime="executor" externalReferenceName="cas-shared-defaultPublicALL_MIGRATION_CT2productofrom_brand"/&amp;gt;
            &amp;lt;BusinessItemFolder&amp;gt;
                &amp;lt;GeneratedDataItem root="bi174" name="bi187" label="producto" xref="producto" usage="categorical" format="$."/&amp;gt;
                &amp;lt;GeneratedDataItem root="bi176" name="bi188" label="from_brand" xref="from_brand" usage="categorical" format="$."/&amp;gt;
                &amp;lt;GeneratedDataItem root="bi183" name="bi189" label="Aggregated Frequency" xref="calculation" usage="quantitative" format="COMMA12." aggregation="sum"/&amp;gt;
                &amp;lt;PredefinedDataItem calculation="totalCount" name="bi190" label="Frequency" usage="quantitative" format="COMMA12."/&amp;gt;
                &amp;lt;PredefinedDataItem calculation="totalCountPercent" name="bi191" label="Frequency Percent" usage="quantitative" format="PERCENT20.2"/&amp;gt;
                &amp;lt;GeneratedDataItem root="bi208" name="bi211" label="join_criteria" xref="calculation1" usage="categorical" format="$."/&amp;gt;
                &amp;lt;GeneratedDataItem root="bi488" name="bi491" label="brand" xref="calculation2" usage="categorical" format="$."/&amp;gt;
            &amp;lt;/BusinessItemFolder&amp;gt;
        &amp;lt;/DataSource&amp;gt;
        &amp;lt;DataSource label="Data_Join (2)" type="relational" name="ds402"&amp;gt;
            &amp;lt;GeneratedResource type="standalone" resource="ge498" generator="dd495" lifetime="executor" sources="ds185 ds198" externalReferenceName="cas-shared-defaultPublicALL_MIGRATION_CT2calculation1from_brandcalculation2calculationproducto"/&amp;gt;
            &amp;lt;BusinessItemFolder&amp;gt;
                &amp;lt;GeneratedDataItem root="bi398" name="bi404" label="from_brand" xref="from_brand" usage="categorical" format="$."/&amp;gt;
                &amp;lt;GeneratedDataItem root="bi400" name="bi405" label="producto" xref="producto" usage="categorical" format="$."/&amp;gt;
                &amp;lt;PredefinedDataItem calculation="totalCount" name="bi406" label="Frequency" usage="quantitative" format="COMMA12."/&amp;gt;
                &amp;lt;PredefinedDataItem calculation="totalCountPercent" name="bi407" label="Frequency Percent" usage="quantitative" format="PERCENT20.2"/&amp;gt;
                &amp;lt;GeneratedDataItem root="bi501" name="bi506" label="brand" xref="calculation2" usage="categorical" format="$."/&amp;gt;
            &amp;lt;/BusinessItemFolder&amp;gt;
        &amp;lt;/DataSource&amp;gt;
        &amp;lt;DataSource label="Data_Join (3)" type="relational" name="ds429"&amp;gt;
            &amp;lt;GeneratedResource type="standalone" resource="ge513" generator="dd510" lifetime="executor" sources="ds402 ds185" externalReferenceName="cas-shared-defaultPublicALL_MIGRATION_CT2calculation2productofrom_brandcalculation2productocalculation"/&amp;gt;
            &amp;lt;BusinessItemFolder&amp;gt;
                &amp;lt;GeneratedDataItem root="bi423" name="bi431" label="from_brand" xref="from_brand" usage="categorical" format="$."/&amp;gt;
                &amp;lt;GeneratedDataItem root="bi424" name="bi432" label="producto" xref="producto" usage="categorical" format="$."/&amp;gt;
                &amp;lt;GeneratedDataItem root="bi427" name="bi433" label="Aggregated Frequency" xref="calculation" usage="quantitative" format="COMMA12." aggregation="average"/&amp;gt;
                &amp;lt;PredefinedDataItem calculation="totalCount" name="bi434" label="Frequency" usage="quantitative" format="COMMA12."/&amp;gt;
                &amp;lt;PredefinedDataItem calculation="totalCountPercent" name="bi435" label="Frequency Percent" usage="quantitative" format="PERCENT20.2"/&amp;gt;
                &amp;lt;CalculatedItem dataType="double" name="bi479" label="want variable" usage="quantitative" format="COMMA12." aggregation="average"&amp;gt;
                    &amp;lt;Expression&amp;gt;cond(ismissing(${bi433,raw}),0,${bi433,raw})&amp;lt;/Expression&amp;gt;
                &amp;lt;/CalculatedItem&amp;gt;
                &amp;lt;GeneratedDataItem root="bi514" name="bi522" label="brand" xref="calculation2" usage="categorical" format="$."/&amp;gt;
            &amp;lt;/BusinessItemFolder&amp;gt;
        &amp;lt;/DataSource&amp;gt;
    &amp;lt;/DataSources&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 14:30:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/sas-va-key-value-object-if-no-count-how-to-display-zero/m-p/813467#M16046</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2022-05-16T14:30:18Z</dc:date>
    </item>
  </channel>
</rss>

