<?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 Conditionally show dimension based on cyclic expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditionally-show-dimension-based-on-cyclic-expression/m-p/1415826#M801224</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am trying to solve a problem but not having much luck!&lt;/P&gt;&lt;P&gt;i have 9 expressions in a cyclic group and a handful of dimensions (1 cyclic that contains 3 fields, and 2 standard dimensions).&lt;/P&gt;&lt;P&gt;what i want is to conditaionally show or hide the 2 standard dimensions based on the expression that has been selected from the cyclic group. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so for example,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Dimensions&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Cyclic&amp;nbsp; (Field A,B,C)&lt;/P&gt;&lt;P&gt;Dim A&lt;/P&gt;&lt;P&gt;Dim B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Expressions&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Cyclic (containing the following)&lt;/P&gt;&lt;P&gt;&amp;gt;Volume&lt;/P&gt;&lt;P&gt;&amp;gt;Sales&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i always want the cyclic dimension showing, but if the user was to select the expression cyclic group and choose 'Volume' then i would want Dim A to hide and Dim B to show. &lt;/P&gt;&lt;P&gt;if the user was to choose Sales from the cyclic expression then i would want to hide Dim A and show Dim B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;does anyone know if this is possible please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>hopkinsc</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Conditionally show dimension based on cyclic expression</title>
      <link>https://community.qlik.com/t5/QlikView/Conditionally-show-dimension-based-on-cyclic-expression/m-p/1415826#M801224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am trying to solve a problem but not having much luck!&lt;/P&gt;&lt;P&gt;i have 9 expressions in a cyclic group and a handful of dimensions (1 cyclic that contains 3 fields, and 2 standard dimensions).&lt;/P&gt;&lt;P&gt;what i want is to conditaionally show or hide the 2 standard dimensions based on the expression that has been selected from the cyclic group. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so for example,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Dimensions&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Cyclic&amp;nbsp; (Field A,B,C)&lt;/P&gt;&lt;P&gt;Dim A&lt;/P&gt;&lt;P&gt;Dim B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Expressions&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Cyclic (containing the following)&lt;/P&gt;&lt;P&gt;&amp;gt;Volume&lt;/P&gt;&lt;P&gt;&amp;gt;Sales&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i always want the cyclic dimension showing, but if the user was to select the expression cyclic group and choose 'Volume' then i would want Dim A to hide and Dim B to show. &lt;/P&gt;&lt;P&gt;if the user was to choose Sales from the cyclic expression then i would want to hide Dim A and show Dim B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;does anyone know if this is possible please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditionally-show-dimension-based-on-cyclic-expression/m-p/1415826#M801224</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionally show dimension based on cyclic expression</title>
      <link>https://community.qlik.com/t5/QlikView/Conditionally-show-dimension-based-on-cyclic-expression/m-p/1415827#M801225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please load a sample&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2017 16:10:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditionally-show-dimension-based-on-cyclic-expression/m-p/1415827#M801225</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2017-11-17T16:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionally show dimension based on cyclic expression</title>
      <link>https://community.qlik.com/t5/QlikView/Conditionally-show-dimension-based-on-cyclic-expression/m-p/1415828#M801226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no easy way (except by using macros) to obtain the currently selected expression from a group. An expression group also doesn't have a label, so GetCurrentField() won't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, you can build upon a workaround that was initially suggested by JohnW in &lt;A href="https://community.qlik.com/message/61947"&gt;How to get the used expression?&lt;/A&gt;. It goes as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In your script, create a date island with two fields that have the names of your expressions both as name and as content. If for example you use the example from your OP, call the fields Volume and Sales and add a singe row with Volume and Sales&lt;/LI&gt;&lt;LI&gt;Create a cyclic dimension group that includes these two fields. Add the group as a dimension to your chart. Place the group icon somewhere on your chart.&lt;/LI&gt;&lt;LI&gt;Pull the two expressions out of the expression group, and either combine them in a single&lt;SPAN style="font-family: 'courier new', courier;"&gt; IF()&lt;/SPAN&gt; construct (one expression switches between two real expressions, depending on the currently selected field in the newly created dimension group - see below) or leave them as they are and give each a conditional show depending on which field is selected in the cyclic group you came to create.&lt;/LI&gt;&lt;LI&gt;Define two real dimension groups: one with fields A and C and one with fields B and C.&lt;/LI&gt;&lt;LI&gt;Add those two dimension groups to your chart, but give each one the same conditional show expression as the conditional show of the corresponding chart expression.&lt;/LI&gt;&lt;LI&gt;Now try it out.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For getting the currently selected dimension from a cyclic group, you can use the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=GetCurrentField(DimensionGroupName)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which you can use to correctly label the following combined expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=IF (GetCurrentField(DimensionGroupName)='Sales', Sum(SalesData), Sum(VolumeData))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF you keep two separate expressions, use conditional show expressions like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;GetCurrentField(DimensionGroupName) = 'Sales'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'courier new', courier;"&gt;GetCurrentField(DimensionGroupName) = 'Volume'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Note: of course the fields in the new Cyclic group cannot have the same names as the Sales and Volume fields in your facts table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Best,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Peter&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2017 16:23:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditionally-show-dimension-based-on-cyclic-expression/m-p/1415828#M801226</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-11-17T16:23:38Z</dc:date>
    </item>
  </channel>
</rss>

