<?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 Gauge Chart with different expressions based on dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247298#M497562</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user can choose from 4 different dimension, like Segment and Market... Shall I swop DimensionField above with my different dimensions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P&gt;@Ungvall&lt;/P&gt;&lt;P&gt;Senior Business Discovery Manager at Advectas AB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Oct 2011 16:27:14 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-10-13T16:27:14Z</dc:date>
    <item>
      <title>Gauge Chart with different expressions based on dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247296#M497560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've a Gauge Chart that shows, for example operating costs in %:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="p1"&gt;-(-(&lt;SPAN class="s1"&gt;sum&lt;/SPAN&gt;( {$&amp;lt;&lt;SPAN class="s2"&gt;RR1_ReportRow&lt;/SPAN&gt;={'Summa Driftskostnader'}&amp;gt;} &lt;SPAN class="s2"&gt;RR_Belopp&lt;/SPAN&gt; ) / &lt;BR /&gt;&lt;SPAN class="s1"&gt;sum&lt;/SPAN&gt;( {$&amp;lt;&lt;SPAN class="s2"&gt;RR1_ReportRow&lt;/SPAN&gt;={'Summa premieintäkt'}&amp;gt;} &lt;SPAN class="s2"&gt;RR_Belopp&lt;/SPAN&gt; )) &lt;/P&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;But if customer choose a dimension I have to use another expression:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;-(&lt;SPAN class="s1"&gt;sum&lt;/SPAN&gt;( {$&amp;lt;&lt;SPAN class="s2"&gt;RR_Affär&lt;/SPAN&gt;={'Försäkring'}, &lt;SPAN class="s2"&gt;RR2_ReportRow&lt;/SPAN&gt;={'Summa Driftskostnader'}&amp;gt;} &lt;SPAN class="s2"&gt;RR_Belopp&lt;/SPAN&gt; ) / &lt;BR /&gt;&lt;SPAN class="s1"&gt;sum&lt;/SPAN&gt;( {$&amp;lt;&lt;SPAN class="s2"&gt;RR_Affär&lt;/SPAN&gt;={'Försäkring'}, &lt;SPAN class="s2"&gt;RR2_ReportRow&lt;/SPAN&gt;={'Summa premieintäkt'}&amp;gt;} &lt;SPAN class="s2"&gt;RR_Belopp&lt;/SPAN&gt; ))&lt;BR /&gt;-&lt;BR /&gt;(&lt;SPAN class="s1"&gt;sum&lt;/SPAN&gt;( {$&amp;lt;&lt;SPAN class="s2"&gt;RR_Affär&lt;/SPAN&gt;={'Försäkring'}, &lt;SPAN class="s2"&gt;RR2_ReportRow&lt;/SPAN&gt;={'Ersättning Agria'}&amp;gt;} &lt;SPAN class="s2"&gt;RR_Belopp&lt;/SPAN&gt; ) / &lt;BR /&gt;&lt;SPAN class="s1"&gt;sum&lt;/SPAN&gt;( {$&amp;lt;&lt;SPAN class="s2"&gt;RR_Affär&lt;/SPAN&gt;={'Försäkring'}, &lt;SPAN class="s2"&gt;RR2_ReportRow&lt;/SPAN&gt;={'Summa premieintäkt'}&amp;gt;} &lt;SPAN class="s2"&gt;RR_Belopp&lt;/SPAN&gt; )) &lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;In a straight table I can use Dimensionality()=0, but that won't work here. Is there another way to do this without partial sums?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P&gt;@Ungvall&lt;/P&gt;&lt;P&gt;Senior Business Discovery Manager at Advectas AB&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 16:06:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247296#M497560</guid>
      <dc:creator />
      <dc:date>2011-10-13T16:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Gauge Chart with different expressions based on dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247297#M497561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ungvall,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How many dimensions (not values) can the user select from? Would it do using a conditional like?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;=If(GetFieldSelections(DimensionField) = 0,&lt;/P&gt;&lt;P&gt;-(-(sum( {$&amp;lt;RR1_ReportRow={'Summa Driftskostnader'}&amp;gt;} RR_Belopp ) / &lt;/P&gt;&lt;P&gt;sum( {$&amp;lt;RR1_ReportRow={'Summa premieintäkt'}&amp;gt;} RR_Belopp ))&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;-(sum( {$&amp;lt;RR_Affär={'Försäkring'}, RR2_ReportRow={'Summa Driftskostnader'}&amp;gt;} RR_Belopp ) / &lt;/P&gt;&lt;P&gt;sum( {$&amp;lt;RR_Affär={'Försäkring'}, RR2_ReportRow={'Summa premieintäkt'}&amp;gt;} RR_Belopp ))&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;(sum( {$&amp;lt;RR_Affär={'Försäkring'}, RR2_ReportRow={'Ersättning Agria'}&amp;gt;} RR_Belopp ) / &lt;/P&gt;&lt;P&gt;sum( {$&amp;lt;RR_Affär={'Försäkring'}, RR2_ReportRow={'Summa premieintäkt'}&amp;gt;} RR_Belopp ))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so, then you can use a variable or a Concat() within set analysis so RR_Affär will always have the same values the user has selected (or even removing that) so when no selections are made, the total shows, otherwise the selection affects the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 16:18:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247297#M497561</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-10-13T16:18:46Z</dc:date>
    </item>
    <item>
      <title>Gauge Chart with different expressions based on dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247298#M497562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user can choose from 4 different dimension, like Segment and Market... Shall I swop DimensionField above with my different dimensions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P&gt;@Ungvall&lt;/P&gt;&lt;P&gt;Senior Business Discovery Manager at Advectas AB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 16:27:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247298#M497562</guid>
      <dc:creator />
      <dc:date>2011-10-13T16:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Gauge Chart with different expressions based on dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247299#M497563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use something like this instead&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P class="p1"&gt;WildMatch&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;GetCurrentSelections&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;Chr&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;39&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;) &amp;amp; &lt;/SPAN&gt;Chr&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;44&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;) &amp;amp; &lt;/SPAN&gt;Chr&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;39&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;), &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;':'&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;), &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;'*Dimension1*', '*Dimension2*'&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not very clean, though...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 16:39:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247299#M497563</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-10-13T16:39:50Z</dc:date>
    </item>
    <item>
      <title>Gauge Chart with different expressions based on dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247300#M497564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is Dimension1* and Dimension2* my dimensions or the expressions. If dimensions, where will the different expressions come in?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Ungvall&lt;/P&gt;&lt;P&gt;Senior Business Discovery Manager at Advectas AB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 16:43:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247300#M497564</guid>
      <dc:creator />
      <dc:date>2011-10-13T16:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Gauge Chart with different expressions based on dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247301#M497565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Those are dimensions (field names) to be used instead of the GetFieldSelections() suggested above. Using the same example I used, the resulting expression for your chart (it's a gauge chart, so there are no dimensions) would be &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;=If(&lt;CODE class="jive-code"&gt;WildMatch(GetCurrentSelections(Chr(39) &amp;amp; Chr(44) &amp;amp; Chr(39), ':'), '*Dimension1*', '*Dimension2*')&lt;/CODE&gt; = 0,&lt;BR /&gt;-(-(sum( {$&amp;lt;RR1_ReportRow={'Summa Driftskostnader'}&amp;gt;} RR_Belopp ) / &lt;BR /&gt;sum( {$&amp;lt;RR1_ReportRow={'Summa premieintäkt'}&amp;gt;} RR_Belopp ))&lt;BR /&gt;,&lt;BR /&gt;-(sum( {$&amp;lt;RR_Affär={'Försäkring'}, RR2_ReportRow={'Summa Driftskostnader'}&amp;gt;} RR_Belopp ) / &lt;BR /&gt;sum( {$&amp;lt;RR_Affär={'Försäkring'}, RR2_ReportRow={'Summa premieintäkt'}&amp;gt;} RR_Belopp ))&lt;BR /&gt;-&lt;BR /&gt;(sum( {$&amp;lt;RR_Affär={'Försäkring'}, RR2_ReportRow={'Ersättning Agria'}&amp;gt;} RR_Belopp ) / &lt;BR /&gt;sum( {$&amp;lt;RR_Affär={'Försäkring'}, RR2_ReportRow={'Summa premieintäkt'}&amp;gt;} RR_Belopp ))&lt;BR /&gt;)&lt;/CODE&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if in the current state of selections Dimension1 or Dimension2 (as many as you need) have selections, WildMatch() will return greater than zero, then entering the "else" part of the conditional, showing the particular expression. If there are no selections, the "then" part of the conditional will be evaluated, showing the total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 17:08:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247301#M497565</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-10-13T17:08:31Z</dc:date>
    </item>
    <item>
      <title>Gauge Chart with different expressions based on dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247302#M497566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not use two different gauge charts with an opposite conditional show on &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;GetFieldSelections(DimensionField)&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 19:42:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247302#M497566</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2011-10-13T19:42:03Z</dc:date>
    </item>
    <item>
      <title>Gauge Chart with different expressions based on dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247303#M497567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately ther's a lot og Gauge Charts...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Uploaded an example...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Ungvall&lt;/P&gt;&lt;P&gt;Senior Business Discovery Manager at Advectas AB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2011 07:48:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247303#M497567</guid>
      <dc:creator />
      <dc:date>2011-10-14T07:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Gauge Chart with different expressions based on dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247304#M497568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See attached example. Although I don't know if the expression is right.. You can also encapsulate the condition in a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2011 08:21:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247304#M497568</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2011-10-14T08:21:45Z</dc:date>
    </item>
    <item>
      <title>Gauge Chart with different expressions based on dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247305#M497569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a million...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Ungvall&lt;/P&gt;&lt;P&gt;Senior Business Discovery Manager at Advectas AB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2011 08:29:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Gauge-Chart-with-different-expressions-based-on-dimension/m-p/247305#M497569</guid>
      <dc:creator />
      <dc:date>2011-10-14T08:29:31Z</dc:date>
    </item>
  </channel>
</rss>

