<?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 Retrieve/match dimension label in a pivot table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Retrieve-match-dimension-label-in-a-pivot-table/m-p/2122958#M91402</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to display different values for a pivot table for the different dimension combination the user sets up by drag and drop.&lt;/P&gt;
&lt;P&gt;I currently have 3 different dimensions as rows, but when trying to use GetObjectField(n) or GetObjectDimension(n) nothing is returned, but null...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Should these functions work normally in a pivot table or are the limited to straight tables? What am I missing?&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="758ae478667e3d8f91e41c2e2b76edaa.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/117180i539B0627E13F74C3/image-size/large?v=v2&amp;amp;px=999" role="button" title="758ae478667e3d8f91e41c2e2b76edaa.png" alt="758ae478667e3d8f91e41c2e2b76edaa.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the picture above the first dimension is a grouped/concatenated "key" (ex. ADIDAS|UNISSEX) (not a calculated dimension, but built in script level), the second dimension is the store name (ex. "BSB") and the third dimension is the brand name (ex. "Adidas").&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I'm trying to do is sum the "Qtd. Referencias" (SKU count) only if dimension 1 = "store name" (loja_sigla), otherwise it should calculate the average. The expression I tried to use is the following, although it doesn't retrieve the dimension label or index:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If(GetObjectField(1) = loja_sigla or Dimensionality() = 0 or Dimensionality() = 3, &lt;BR /&gt;//THEN&lt;BR /&gt;Sum(Aggr(Count({1&amp;lt;key_deposito = {'1', '1 - ESTOQUE'}, estoque_quantidade = {"&amp;gt;=1"}, estoque_data = {'$(=MonthEnd(Max(data)))'}&amp;gt;} Distinct produto_referencia), loja_sigla, produto_agrupamento_genero, produto_marca)),&lt;BR /&gt;&lt;BR /&gt;//ELSE&lt;BR /&gt;Sum(Aggr(Count({1&amp;lt;key_deposito = {'1', '1 - ESTOQUE'}, estoque_quantidade = {"&amp;gt;=1"}, estoque_data = {'$(=MonthEnd(Max(data)))'}&amp;gt;} Distinct produto_referencia), loja_sigla, produto_agrupamento_genero, produto_marca))&lt;BR /&gt;/&lt;BR /&gt;Sum(Aggr(Count({1&amp;lt;key_deposito = {'1', '1 - ESTOQUE'}, estoque_quantidade = {"&amp;gt;=1"}, estoque_data = {'$(=MonthEnd(Max(data)))'}&amp;gt;} Distinct loja_sigla), loja_sigla, produto_agrupamento_genero, produto_marca))&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is just the context of what I'm trying to do, but I guess it doesn't matter that much. The problem is GetObjectField or GetObjectDimension doesn't work, regardless the index number I use...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help is appreciated&lt;/P&gt;</description>
    <pubDate>Wed, 27 Sep 2023 11:49:05 GMT</pubDate>
    <dc:creator>pedrohenriqueperna</dc:creator>
    <dc:date>2023-09-27T11:49:05Z</dc:date>
    <item>
      <title>Retrieve/match dimension label in a pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Retrieve-match-dimension-label-in-a-pivot-table/m-p/2122958#M91402</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to display different values for a pivot table for the different dimension combination the user sets up by drag and drop.&lt;/P&gt;
&lt;P&gt;I currently have 3 different dimensions as rows, but when trying to use GetObjectField(n) or GetObjectDimension(n) nothing is returned, but null...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Should these functions work normally in a pivot table or are the limited to straight tables? What am I missing?&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="758ae478667e3d8f91e41c2e2b76edaa.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/117180i539B0627E13F74C3/image-size/large?v=v2&amp;amp;px=999" role="button" title="758ae478667e3d8f91e41c2e2b76edaa.png" alt="758ae478667e3d8f91e41c2e2b76edaa.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the picture above the first dimension is a grouped/concatenated "key" (ex. ADIDAS|UNISSEX) (not a calculated dimension, but built in script level), the second dimension is the store name (ex. "BSB") and the third dimension is the brand name (ex. "Adidas").&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I'm trying to do is sum the "Qtd. Referencias" (SKU count) only if dimension 1 = "store name" (loja_sigla), otherwise it should calculate the average. The expression I tried to use is the following, although it doesn't retrieve the dimension label or index:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If(GetObjectField(1) = loja_sigla or Dimensionality() = 0 or Dimensionality() = 3, &lt;BR /&gt;//THEN&lt;BR /&gt;Sum(Aggr(Count({1&amp;lt;key_deposito = {'1', '1 - ESTOQUE'}, estoque_quantidade = {"&amp;gt;=1"}, estoque_data = {'$(=MonthEnd(Max(data)))'}&amp;gt;} Distinct produto_referencia), loja_sigla, produto_agrupamento_genero, produto_marca)),&lt;BR /&gt;&lt;BR /&gt;//ELSE&lt;BR /&gt;Sum(Aggr(Count({1&amp;lt;key_deposito = {'1', '1 - ESTOQUE'}, estoque_quantidade = {"&amp;gt;=1"}, estoque_data = {'$(=MonthEnd(Max(data)))'}&amp;gt;} Distinct produto_referencia), loja_sigla, produto_agrupamento_genero, produto_marca))&lt;BR /&gt;/&lt;BR /&gt;Sum(Aggr(Count({1&amp;lt;key_deposito = {'1', '1 - ESTOQUE'}, estoque_quantidade = {"&amp;gt;=1"}, estoque_data = {'$(=MonthEnd(Max(data)))'}&amp;gt;} Distinct loja_sigla), loja_sigla, produto_agrupamento_genero, produto_marca))&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is just the context of what I'm trying to do, but I guess it doesn't matter that much. The problem is GetObjectField or GetObjectDimension doesn't work, regardless the index number I use...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help is appreciated&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 11:49:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Retrieve-match-dimension-label-in-a-pivot-table/m-p/2122958#M91402</guid>
      <dc:creator>pedrohenriqueperna</dc:creator>
      <dc:date>2023-09-27T11:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve/match dimension label in a pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Retrieve-match-dimension-label-in-a-pivot-table/m-p/2122974#M91404</link>
      <description>&lt;P&gt;I'm not aware of any issues with these functions in a pivot. I'd suggest you check the rest of your formulas for potential issues and/or break them down into parts and check each part.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Or_0-1695816905199.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/117184i47BF405B8EE5F6D8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Or_0-1695816905199.png" alt="Or_0-1695816905199.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 12:15:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Retrieve-match-dimension-label-in-a-pivot-table/m-p/2122974#M91404</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2023-09-27T12:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve/match dimension label in a pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Retrieve-match-dimension-label-in-a-pivot-table/m-p/2123038#M91410</link>
      <description>&lt;P&gt;Hey! Thanks for the reply&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was trying to use GetObjectDimension, but didn't realize it delivers the label for the dimension, not the dimension name itself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It worked now, thanks for the tip!! &lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 13:40:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Retrieve-match-dimension-label-in-a-pivot-table/m-p/2123038#M91410</guid>
      <dc:creator>pedrohenriqueperna</dc:creator>
      <dc:date>2023-09-27T13:40:32Z</dc:date>
    </item>
  </channel>
</rss>

