<?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: Dynamic X axis on a boxplot depending on user selection in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Dynamic-X-axis-on-a-boxplot-depending-on-user-selection/m-p/2453555#M98190</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/293569"&gt;@Gaël&lt;/a&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;it seems like you've already put considerable effort into customizing your visualizations, here is an attempt towards your goal, but I would like to point out that I didn't test it:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=sum({&amp;lt;filter_var=, [time_dim Date]={"&amp;gt;=$(=Min({&amp;lt;filter_var=&amp;gt;} [time_dim Date]))&amp;lt;=$(=Max({&amp;lt;filter_var=&amp;gt;} [time_dim Date]))"} &amp;gt;} Aggr(Sum(continuous_var), $(=if(count(distinct {$&amp;lt;filter_var=&amp;gt;} [time_dim YearMonth]) &amp;lt;= 24, [time_dim YearMonth], [time_dim Year]))))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 May 2024 09:17:27 GMT</pubDate>
    <dc:creator>F_B</dc:creator>
    <dc:date>2024-05-17T09:17:27Z</dc:date>
    <item>
      <title>Dynamic X axis on a boxplot depending on user selection</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-X-axis-on-a-boxplot-depending-on-user-selection/m-p/2434648#M96909</link>
      <description>&lt;P&gt;I am using Qlik Sense (February 2023 Patch 10).&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I want to enhance my current boxplot of &lt;EM&gt;continuous_var&lt;/EM&gt; over &lt;EM&gt;time_dim&lt;/EM&gt;, disregarding the settings of &lt;EM&gt;filter_var&lt;/EM&gt;. Currently, I plot &lt;EM&gt;Sum({$&amp;lt;filter_var=&amp;gt;} continuous_var)&lt;/EM&gt; with &lt;EM&gt;[time_dim Year]&lt;/EM&gt; as X-axis dimension.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;As whole years might be a bit coarse, I want to dynamically "make a zoom" on the X-axis and change it to &lt;EM&gt;[time_dim YearMonth]&lt;/EM&gt; depending on the selection of a time span by the user (VizLib's Calendar filter, in my case). Using a drilldown dimension won't work if I want to display months spanning two different years. More generally, I want to display data by week for the last 26 weeks, or by month for the last 24 months, or by quarter for the last 24 quarters, or by year.&lt;/P&gt;
&lt;P&gt;I already got this to work for a bar chart of &lt;EM&gt;Count(ID)&lt;/EM&gt; over &lt;EM&gt;time_dim&lt;/EM&gt;, but this does not currently work for boxplots. For the bar chart, I&amp;nbsp;use the following expression for the X axis:&lt;BR /&gt;&lt;EM&gt;=$(=if(count(distinct {$&amp;lt;filter_var=&amp;gt;} [time_dim YearMonth]) &amp;lt;= 24, '[time_dim YearMonth]', '[time_dim Year]'))&lt;BR /&gt;&lt;/EM&gt;This selects&amp;nbsp;&lt;EM&gt;[time_dim YearMonth] &lt;/EM&gt;instead of&amp;nbsp;&lt;EM&gt;[time_dim Year]&amp;nbsp;&lt;/EM&gt;whenever 24 months or less have been selected.&lt;/P&gt;
&lt;P&gt;To avoid empty bars, I use the following expression to replace &lt;EM&gt;Count([ID])&lt;/EM&gt;:&lt;BR /&gt;&lt;EM&gt;=sum({&amp;lt;filter_var=, [time_dim Date]={"&amp;gt;=$(=Min({&amp;lt;filter_var=&amp;gt;} [time_dim Date]))&amp;lt;=$(=Max({&amp;lt;filter_var=&amp;gt;} [time_dim Date]))"} &amp;gt; } Aggr(Count([ID]), [time_dim Date]))&lt;/EM&gt;&lt;BR /&gt;Here, I aggregated over single dates, since I may want to have boxplots by week as well.&lt;/P&gt;
&lt;P&gt;For the boxplot, I imagine that I need to replace &lt;EM&gt;continuous_var &lt;/EM&gt;by&amp;nbsp;something along this line:&lt;BR /&gt;&lt;EM&gt;=sum({...} Aggr(Sum(continuous_var, ID))&lt;/EM&gt;&lt;BR /&gt;But that doesn't do the trick. Any thoughts?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 10:36:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-X-axis-on-a-boxplot-depending-on-user-selection/m-p/2434648#M96909</guid>
      <dc:creator>Gaël</dc:creator>
      <dc:date>2024-03-26T10:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic X axis on a boxplot depending on user selection</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-X-axis-on-a-boxplot-depending-on-user-selection/m-p/2453555#M98190</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/293569"&gt;@Gaël&lt;/a&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;it seems like you've already put considerable effort into customizing your visualizations, here is an attempt towards your goal, but I would like to point out that I didn't test it:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=sum({&amp;lt;filter_var=, [time_dim Date]={"&amp;gt;=$(=Min({&amp;lt;filter_var=&amp;gt;} [time_dim Date]))&amp;lt;=$(=Max({&amp;lt;filter_var=&amp;gt;} [time_dim Date]))"} &amp;gt;} Aggr(Sum(continuous_var), $(=if(count(distinct {$&amp;lt;filter_var=&amp;gt;} [time_dim YearMonth]) &amp;lt;= 24, [time_dim YearMonth], [time_dim Year]))))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 09:17:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-X-axis-on-a-boxplot-depending-on-user-selection/m-p/2453555#M98190</guid>
      <dc:creator>F_B</dc:creator>
      <dc:date>2024-05-17T09:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic X axis on a boxplot depending on user selection</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-X-axis-on-a-boxplot-depending-on-user-selection/m-p/2454687#M98327</link>
      <description>&lt;P&gt;Thanks F_B! I will try that next time I touch the app.&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 12:39:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-X-axis-on-a-boxplot-depending-on-user-selection/m-p/2454687#M98327</guid>
      <dc:creator>Gaël</dc:creator>
      <dc:date>2024-05-21T12:39:16Z</dc:date>
    </item>
  </channel>
</rss>

