<?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 Switch between dimensions based on measures in chart in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Switch-between-dimensions-based-on-measures-in-chart/m-p/1776741#M60220</link>
    <description>&lt;P&gt;Hi folks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an exp.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;IF(
		COUNT(DISTINCT [Dim7]) &amp;gt;COUNT(DISTINCT [Dim6]) 
   	AND COUNT(DISTINCT [Dim7]) &amp;gt;COUNT(DISTINCT [Dim5])
    AND COUNT(DISTINCT [Dim7]) &amp;gt;COUNT(DISTINCT [Dim4]) 
    AND COUNT(DISTINCT [Dim7]) &amp;gt;COUNT(DISTINCT [Dim3]) 
    AND COUNT(DISTINCT [Dim7]) &amp;gt;COUNT(DISTINCT [Dim2]), [Dim7],

IF(
		COUNT(DISTINCT [Dim6]) &amp;gt;COUNT(DISTINCT [Dim7]) 
   	AND COUNT(DISTINCT [Dim6]) &amp;gt;COUNT(DISTINCT [Dim5])
    AND COUNT(DISTINCT [Dim6]) &amp;gt;COUNT(DISTINCT [Dim4]) 
    AND COUNT(DISTINCT [Dim6]) &amp;gt;COUNT(DISTINCT [Dim3]) 
    AND COUNT(DISTINCT [Dim6]) &amp;gt;COUNT(DISTINCT [Dim2]),  [Dim6],    
      
IF(
		COUNT(DISTINCT [Dim5]) &amp;gt;COUNT(DISTINCT [Dim6]) 
   	AND COUNT(DISTINCT [Dim5]) &amp;gt;COUNT(DISTINCT [Dim7])
    AND COUNT(DISTINCT [Dim5]) &amp;gt;COUNT(DISTINCT [Dim4]) 
    AND COUNT(DISTINCT [Dim5]) &amp;gt;COUNT(DISTINCT [Dim3]) 
    AND COUNT(DISTINCT [Dim5]) &amp;gt;COUNT(DISTINCT [Dim2]),  [Dim5],    
IF(
		COUNT(DISTINCT [Dim4]) &amp;gt;COUNT(DISTINCT [Dim6]) 
   	AND COUNT(DISTINCT [Dim4]) &amp;gt;COUNT(DISTINCT [Dim5])
    AND COUNT(DISTINCT [Dim4]) &amp;gt;COUNT(DISTINCT [Dim7]) 
    AND COUNT(DISTINCT [Dim4]) &amp;gt;COUNT(DISTINCT [Dim3]) 
    AND COUNT(DISTINCT [Dim4]) &amp;gt;COUNT(DISTINCT [Dim2]),  Dim4,     
IF(
		COUNT(DISTINCT [Dim3]) &amp;gt;COUNT(DISTINCT [Dim6]) 
   	AND COUNT(DISTINCT [Dim3]) &amp;gt;COUNT(DISTINCT [Dim5])
    AND COUNT(DISTINCT [Dim3]) &amp;gt;COUNT(DISTINCT [Dim4]) 
    AND COUNT(DISTINCT [Dim3]) &amp;gt;COUNT(DISTINCT [Dim7]) 
    AND COUNT(DISTINCT [Dim3]) &amp;gt;COUNT(DISTINCT [Dim2]),  [Dim3], 
    
    )))))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;And i would like to put in chart/table dimension depends on count&amp;nbsp; and have no idea to do it, anybody know how to use this with aggr() or another function to display dimension depends on count measure&amp;nbsp;&lt;/P&gt;&lt;P&gt;i get result Invalid Dimensions&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Dec 2021 21:05:46 GMT</pubDate>
    <dc:creator>Micki</dc:creator>
    <dc:date>2021-12-20T21:05:46Z</dc:date>
    <item>
      <title>Switch between dimensions based on measures in chart</title>
      <link>https://community.qlik.com/t5/App-Development/Switch-between-dimensions-based-on-measures-in-chart/m-p/1776741#M60220</link>
      <description>&lt;P&gt;Hi folks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an exp.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;IF(
		COUNT(DISTINCT [Dim7]) &amp;gt;COUNT(DISTINCT [Dim6]) 
   	AND COUNT(DISTINCT [Dim7]) &amp;gt;COUNT(DISTINCT [Dim5])
    AND COUNT(DISTINCT [Dim7]) &amp;gt;COUNT(DISTINCT [Dim4]) 
    AND COUNT(DISTINCT [Dim7]) &amp;gt;COUNT(DISTINCT [Dim3]) 
    AND COUNT(DISTINCT [Dim7]) &amp;gt;COUNT(DISTINCT [Dim2]), [Dim7],

IF(
		COUNT(DISTINCT [Dim6]) &amp;gt;COUNT(DISTINCT [Dim7]) 
   	AND COUNT(DISTINCT [Dim6]) &amp;gt;COUNT(DISTINCT [Dim5])
    AND COUNT(DISTINCT [Dim6]) &amp;gt;COUNT(DISTINCT [Dim4]) 
    AND COUNT(DISTINCT [Dim6]) &amp;gt;COUNT(DISTINCT [Dim3]) 
    AND COUNT(DISTINCT [Dim6]) &amp;gt;COUNT(DISTINCT [Dim2]),  [Dim6],    
      
IF(
		COUNT(DISTINCT [Dim5]) &amp;gt;COUNT(DISTINCT [Dim6]) 
   	AND COUNT(DISTINCT [Dim5]) &amp;gt;COUNT(DISTINCT [Dim7])
    AND COUNT(DISTINCT [Dim5]) &amp;gt;COUNT(DISTINCT [Dim4]) 
    AND COUNT(DISTINCT [Dim5]) &amp;gt;COUNT(DISTINCT [Dim3]) 
    AND COUNT(DISTINCT [Dim5]) &amp;gt;COUNT(DISTINCT [Dim2]),  [Dim5],    
IF(
		COUNT(DISTINCT [Dim4]) &amp;gt;COUNT(DISTINCT [Dim6]) 
   	AND COUNT(DISTINCT [Dim4]) &amp;gt;COUNT(DISTINCT [Dim5])
    AND COUNT(DISTINCT [Dim4]) &amp;gt;COUNT(DISTINCT [Dim7]) 
    AND COUNT(DISTINCT [Dim4]) &amp;gt;COUNT(DISTINCT [Dim3]) 
    AND COUNT(DISTINCT [Dim4]) &amp;gt;COUNT(DISTINCT [Dim2]),  Dim4,     
IF(
		COUNT(DISTINCT [Dim3]) &amp;gt;COUNT(DISTINCT [Dim6]) 
   	AND COUNT(DISTINCT [Dim3]) &amp;gt;COUNT(DISTINCT [Dim5])
    AND COUNT(DISTINCT [Dim3]) &amp;gt;COUNT(DISTINCT [Dim4]) 
    AND COUNT(DISTINCT [Dim3]) &amp;gt;COUNT(DISTINCT [Dim7]) 
    AND COUNT(DISTINCT [Dim3]) &amp;gt;COUNT(DISTINCT [Dim2]),  [Dim3], 
    
    )))))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;And i would like to put in chart/table dimension depends on count&amp;nbsp; and have no idea to do it, anybody know how to use this with aggr() or another function to display dimension depends on count measure&amp;nbsp;&lt;/P&gt;&lt;P&gt;i get result Invalid Dimensions&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 21:05:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Switch-between-dimensions-based-on-measures-in-chart/m-p/1776741#M60220</guid>
      <dc:creator>Micki</dc:creator>
      <dc:date>2021-12-20T21:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Switch between dimensions based on measures in chart</title>
      <link>https://community.qlik.com/t5/App-Development/Switch-between-dimensions-based-on-measures-in-chart/m-p/1776760#M60223</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/124906"&gt;@Micki&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to have a field to aggregate on that has same value for all Dim fields, so try this:&lt;/P&gt;&lt;P&gt;Depending on the structure of your data model, you can create a field, AllField (in your fact table?) that has the same value for all rows, maybe 1.&amp;nbsp; Then you can use that field in your aggr() function.&lt;/P&gt;&lt;P&gt;if( aggr(count(distinct Dim7), AllField) &amp;gt; aggr(count(distinct Dim6), AllField)&lt;/P&gt;&lt;P&gt;AND . . .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 15:56:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Switch-between-dimensions-based-on-measures-in-chart/m-p/1776760#M60223</guid>
      <dc:creator>GaryGiles</dc:creator>
      <dc:date>2021-01-22T15:56:31Z</dc:date>
    </item>
  </channel>
</rss>

