<?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: Change to alternative dimension when Time dimension changes in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Change-to-alternative-dimension-when-Time-dimension-changes/m-p/1326234#M28774</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Figured it out.&amp;nbsp; The variable needs to be defined with an '=' sign and the formula for the chart needs $ expansion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vdWeeksAvailable:&amp;nbsp; =Count(DISTINCT) PoolWeek)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the following formula works as expected:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If($(=vdWeeksAvailable) &amp;gt;1,PoolWeek,Date(Date))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Apr 2017 17:40:14 GMT</pubDate>
    <dc:creator>mikegrattan</dc:creator>
    <dc:date>2017-04-27T17:40:14Z</dc:date>
    <item>
      <title>Change to alternative dimension when Time dimension changes</title>
      <link>https://community.qlik.com/t5/App-Development/Change-to-alternative-dimension-when-Time-dimension-changes/m-p/1326229#M28769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my application I have some line charts with the primary dimension as Week and the alternative dimension as Date. When a user filters their view by Period or Year, (but not Week or Date), I'd like the chart's primary dimension to be Week. When the user filters down to the Week level, I'd like to change the chart's primary dimension to Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to do this automatically?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Apr 2017 21:11:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-to-alternative-dimension-when-Time-dimension-changes/m-p/1326229#M28769</guid>
      <dc:creator>mikegrattan</dc:creator>
      <dc:date>2017-04-26T21:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Change to alternative dimension when Time dimension changes</title>
      <link>https://community.qlik.com/t5/App-Development/Change-to-alternative-dimension-when-Time-dimension-changes/m-p/1326230#M28770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;I donot know if understand well what you say so... If you need your line charts have Week dimension when there are many weeks available in resulting selections and Date when is only a week available you could try the following calculated dimension: If(Count(DISTINCT Week) = 1, Date, Week)&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;H&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2017 04:02:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-to-alternative-dimension-when-Time-dimension-changes/m-p/1326230#M28770</guid>
      <dc:creator>hector_munoz</dc:creator>
      <dc:date>2017-04-27T04:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Change to alternative dimension when Time dimension changes</title>
      <link>https://community.qlik.com/t5/App-Development/Change-to-alternative-dimension-when-Time-dimension-changes/m-p/1326231#M28771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your response Hector. I tried the following formula based on your suggestion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(COUNT(DISTINCT PoolWeek) &amp;gt;1, PoolWeek,Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, Qlik Sense tells me this is an "invalid dimension", even though the formula has no syntax issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2017 13:36:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-to-alternative-dimension-when-Time-dimension-changes/m-p/1326231#M28771</guid>
      <dc:creator>mikegrattan</dc:creator>
      <dc:date>2017-04-27T13:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Change to alternative dimension when Time dimension changes</title>
      <link>https://community.qlik.com/t5/App-Development/Change-to-alternative-dimension-when-Time-dimension-changes/m-p/1326232#M28772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to create a variable vdWeeksAvailable = Count(DISTINCT &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;PoolWeek&lt;/SPAN&gt;) and replace the above calculated dimension by &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;If(&lt;SPAN style="font-size: 13.3333px;"&gt;vdWeeksAvailable&lt;/SPAN&gt; &amp;gt;1, PoolWeek,Date).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;H&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2017 14:06:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-to-alternative-dimension-when-Time-dimension-changes/m-p/1326232#M28772</guid>
      <dc:creator>hector_munoz</dc:creator>
      <dc:date>2017-04-27T14:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Change to alternative dimension when Time dimension changes</title>
      <link>https://community.qlik.com/t5/App-Development/Change-to-alternative-dimension-when-Time-dimension-changes/m-p/1326233#M28773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The suggested use of a variable seems to be on the right track. The expression no longer gives an "invalid dimension" message.&amp;nbsp; However, it doesn't work as expected; if I filter on one week it should show me Dates, but it still only shows the week.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Calculated Week_Date dimension.jpg" class="jive-image image-1" src="/legacyfs/online/161479_Calculated Week_Date dimension.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2017 14:43:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-to-alternative-dimension-when-Time-dimension-changes/m-p/1326233#M28773</guid>
      <dc:creator>mikegrattan</dc:creator>
      <dc:date>2017-04-27T14:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Change to alternative dimension when Time dimension changes</title>
      <link>https://community.qlik.com/t5/App-Development/Change-to-alternative-dimension-when-Time-dimension-changes/m-p/1326234#M28774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Figured it out.&amp;nbsp; The variable needs to be defined with an '=' sign and the formula for the chart needs $ expansion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vdWeeksAvailable:&amp;nbsp; =Count(DISTINCT) PoolWeek)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the following formula works as expected:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If($(=vdWeeksAvailable) &amp;gt;1,PoolWeek,Date(Date))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2017 17:40:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-to-alternative-dimension-when-Time-dimension-changes/m-p/1326234#M28774</guid>
      <dc:creator>mikegrattan</dc:creator>
      <dc:date>2017-04-27T17:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Change to alternative dimension when Time dimension changes</title>
      <link>https://community.qlik.com/t5/App-Development/Change-to-alternative-dimension-when-Time-dimension-changes/m-p/1326235#M28775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Congrats, Mike! Glad it is solved!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2017 18:14:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-to-alternative-dimension-when-Time-dimension-changes/m-p/1326235#M28775</guid>
      <dc:creator>hector_munoz</dc:creator>
      <dc:date>2017-04-27T18:14:15Z</dc:date>
    </item>
  </channel>
</rss>

