<?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 Line chart with 2 dimensions ( 1 dimension with buckets) and 1 measures in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Line-chart-with-2-dimensions-1-dimension-with-buckets-and-1/m-p/1941493#M77572</link>
    <description>&lt;P&gt;We want to show month wise count of states in different buckets of sales. We need to show it in 4 buckets:-&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. 0-2000&lt;/P&gt;
&lt;P&gt;2. 2000-5000&lt;/P&gt;
&lt;P&gt;3. 5000-10000&lt;/P&gt;
&lt;P&gt;4. &amp;gt;=10000&lt;/P&gt;
&lt;P&gt;For example:- how many states sold between 2000 to 5000 in each month, how many sold 5000-10000 in each month and so on. This needs to be represented in line chart with X- axis as MonthYear and Y-axis as trend of how each bucket changes w.r.t. to MonthYear i.e. how many states fall in each bucket in each monthyear.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note:- The buckets are not fixed. Buckets will be given as input by the user.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Sample data:-&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harveenkaur_1-1654765637775.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/81352iF78C32334FC32B61/image-size/medium?v=v2&amp;amp;px=400" role="button" title="harveenkaur_1-1654765637775.png" alt="harveenkaur_1-1654765637775.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jun 2022 03:35:51 GMT</pubDate>
    <dc:creator>harveenkaur</dc:creator>
    <dc:date>2022-06-10T03:35:51Z</dc:date>
    <item>
      <title>Line chart with 2 dimensions ( 1 dimension with buckets) and 1 measures</title>
      <link>https://community.qlik.com/t5/App-Development/Line-chart-with-2-dimensions-1-dimension-with-buckets-and-1/m-p/1941493#M77572</link>
      <description>&lt;P&gt;We want to show month wise count of states in different buckets of sales. We need to show it in 4 buckets:-&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. 0-2000&lt;/P&gt;
&lt;P&gt;2. 2000-5000&lt;/P&gt;
&lt;P&gt;3. 5000-10000&lt;/P&gt;
&lt;P&gt;4. &amp;gt;=10000&lt;/P&gt;
&lt;P&gt;For example:- how many states sold between 2000 to 5000 in each month, how many sold 5000-10000 in each month and so on. This needs to be represented in line chart with X- axis as MonthYear and Y-axis as trend of how each bucket changes w.r.t. to MonthYear i.e. how many states fall in each bucket in each monthyear.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note:- The buckets are not fixed. Buckets will be given as input by the user.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Sample data:-&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harveenkaur_1-1654765637775.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/81352iF78C32334FC32B61/image-size/medium?v=v2&amp;amp;px=400" role="button" title="harveenkaur_1-1654765637775.png" alt="harveenkaur_1-1654765637775.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 03:35:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Line-chart-with-2-dimensions-1-dimension-with-buckets-and-1/m-p/1941493#M77572</guid>
      <dc:creator>harveenkaur</dc:creator>
      <dc:date>2022-06-10T03:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart with 2 dimensions ( 1 dimension with buckets) and 1 measures</title>
      <link>https://community.qlik.com/t5/App-Development/Line-chart-with-2-dimensions-1-dimension-with-buckets-and-1/m-p/1941699#M77590</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/39229"&gt;@harveenkaur&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Nice question. I did some work for you. I used&amp;nbsp;&lt;A href="https://www.extracttable.com/" target="_blank"&gt;https://www.extracttable.com/&lt;/A&gt;&amp;nbsp;for extracting your sample data. After that, the first thing you'll need is to set up the buckets in the load script. This can be done with the&amp;nbsp;&lt;EM&gt;intervalmatch&lt;/EM&gt; function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;// Setting up the buckets
Bucket:
LOAD * INLINE [Key, From, To
1, 0,2000
2, 2001,5000
3, 5001, 10000
4, 10001, 99999999999]
;

// Setting up the bucket description
Bucket_Dim:
LOAD * INLINE [Key, Description
1, 0-2000
2, 2000-5000
3, 5000-10000
4, &amp;gt;=10000
];

// Loading the source
Source:
LOAD * INLINE [State,MonthYear,Sales
State1,Apr-21,15795
State2,Apr-21,2424
State3,Apr-21,13312
State4,Apr-21,12518
State5,Apr-21,8519
State6,Apr-21,20229
State7,Apr-21,8606
State8,Apr-21,7348
State9,Apr-21,14187
State10,Apr-21,4104
State11,Apr-21,13535
State12,Apr-21,14833
State13,Apr-21,14277
State14,Apr-21,8276
State15,Apr-21,7312
State16,Apr-21,14348
State17,Apr-21,11437
State18,Apr-21,19547
State19,Apr-21,1107
State1,May-21,6858
State2,May-21,3501
State3,May-21,2369
State4,May-21,1755
State5,May-21,9840
State6,May-21,6290
State7,May-21,9203
State8,May-21,2149
State9,May-21,7301
State10,May-21,17488
State11,May-21,13015
State12,May-21,4447
State13,May-21,6935
State14,May-21,16578
State15,May-21,1612
State16,May-21,16038
State17,May-21,14577
State18,May-21,10875
State19,May-21,12537
];

// Matching the Sales with the buckettable
left join (Source)
IntervalMatch(Sales)
LOAD From as From_tmp
,	 To as To_tmp
Resident Bucket
;
// Joining the key so we can use the description as dimension
left join (Source)
LOAD From as From_tmp 
,	 To  as To_tmp
,	 Key
Resident Bucket
;
drop fields From_tmp
,			To_tmp
from Source;
;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make a line chart with the dimensions:&lt;/P&gt;
&lt;P&gt;1. MonthYear&lt;/P&gt;
&lt;P&gt;2. Description&lt;/P&gt;
&lt;P&gt;Measure:&amp;nbsp;count({$}State)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eddie_wagt_1-1654783156684.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/81396iF1420F66587F8D8B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="eddie_wagt_1-1654783156684.png" alt="eddie_wagt_1-1654783156684.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards&lt;/P&gt;
&lt;P&gt;Eddie&lt;/P&gt;
&lt;TABLE style="border-style: solid; width: 100%; border-color: #006B30;" border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%" style="background-color: #009845; width: 100%; border-style: solid;"&gt;&lt;FONT color="#FFFFFF"&gt;If this answers your question or solves your issue, be sure to mark the answer as correct by clicking '&lt;STRONG&gt;&lt;SPAN class="notion-enable-hover" data-token-index="1" data-reactroot=""&gt;Accept as Solution&lt;/SPAN&gt;&lt;/STRONG&gt;'. This will mark the post as solved and other Qlikkies will gravitate towards this post as it as a possible solution for their issue.&amp;nbsp;Multiple responses can be accepted as a solution so make sure to select all that apply.&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Thu, 09 Jun 2022 13:59:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Line-chart-with-2-dimensions-1-dimension-with-buckets-and-1/m-p/1941699#M77590</guid>
      <dc:creator>eddie_wagt</dc:creator>
      <dc:date>2022-06-09T13:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart with 2 dimensions ( 1 dimension with buckets) and 1 measures</title>
      <link>https://community.qlik.com/t5/App-Development/Line-chart-with-2-dimensions-1-dimension-with-buckets-and-1/m-p/1941929#M77598</link>
      <description>&lt;P&gt;Thank you for the answer. But there is one more requirement. The buckets are not fixed. The buckets will be given as input by the user. I am using variable to take the input.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 03:34:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Line-chart-with-2-dimensions-1-dimension-with-buckets-and-1/m-p/1941929#M77598</guid>
      <dc:creator>harveenkaur</dc:creator>
      <dc:date>2022-06-10T03:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart with 2 dimensions ( 1 dimension with buckets) and 1 measures</title>
      <link>https://community.qlik.com/t5/App-Development/Line-chart-with-2-dimensions-1-dimension-with-buckets-and-1/m-p/1942021#M77601</link>
      <description>&lt;P&gt;Ok, overlooked that one.&lt;/P&gt;
&lt;P&gt;You can solve this by making variables.&lt;/P&gt;
&lt;P&gt;1. make these variables (without a definition)&lt;BR /&gt;vBucket1&lt;BR /&gt;vBucket2&lt;BR /&gt;vBucket3&lt;BR /&gt;vBucket4&lt;BR /&gt;2. make these variables with definition&lt;BR /&gt;vBucket1_Text = '1. '&amp;amp;'0'&amp;amp;'-'&amp;amp;$(vBucket1)&lt;BR /&gt;vBucket2_Text = '2. '&amp;amp;$(=vBucket1+1)&amp;amp;'-'&amp;amp;$(vBucket2)&lt;BR /&gt;vBucket3_Text = '3. '&amp;amp;$(=vBucket2+1)&amp;amp;'-'&amp;amp;$(vBucket3)&lt;BR /&gt;vBucket4_Text = '4. '&amp;amp;$(=vBucket3+1)&amp;amp;'-'&amp;amp;$(vBucket4)&lt;BR /&gt;3. make 4 Variable input objects and set it up&lt;/P&gt;
&lt;P&gt;Don't forget to set it as Slider and Update on Drag&lt;/P&gt;
&lt;P&gt;Make Titles as follow :&amp;nbsp;='$(vBucket1_Text)'&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eddie_wagt_2-1654850158308.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/81447i18EC19E08E36585E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="eddie_wagt_2-1654850158308.png" alt="eddie_wagt_2-1654850158308.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eddie_wagt_3-1654850363816.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/81449iF5EA62C91144C88C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="eddie_wagt_3-1654850363816.png" alt="eddie_wagt_3-1654850363816.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4. make a Line Chart object and make this configuration&lt;BR /&gt;Dimensions:&lt;BR /&gt;MonthYear&lt;/P&gt;
&lt;P&gt;Calculated Dimension (fill this in the expression editor)&lt;BR /&gt;=ValueList('$(vBucket1_Text)','$(vBucket2_Text)','$(vBucket3_Text)','$(vBucket4_Text)')&lt;BR /&gt;Label it&lt;/P&gt;
&lt;P&gt;Measure&lt;BR /&gt;=pick(match(ValueList('$(vBucket1_Text)','$(vBucket2_Text)','$(vBucket3_Text)','$(vBucket4_Text)','$(vBucket1_Text)'),'$(vBucket1_Text)','$(vBucket2_Text)','$(vBucket3_Text)','$(vBucket4_Text)')&lt;BR /&gt;,count({$&amp;lt;Sales={"&amp;gt;=0&amp;lt;=$(vBucket1)"}&amp;gt;}State)&lt;BR /&gt;,count({$&amp;lt;Sales={"&amp;gt;=$(vBucket1)&amp;lt;=$(vBucket2)"}&amp;gt;}State)&lt;BR /&gt;,count({$&amp;lt;Sales={"&amp;gt;=$(vBucket2)&amp;lt;=$(vBucket3)"}&amp;gt;}State)&lt;BR /&gt;,count({$&amp;lt;Sales={"&amp;gt;=$(vBucket3)&amp;lt;=$(vBucket4)"}&amp;gt;}State)&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;5. Result&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eddie_wagt_4-1654850379124.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/81450i4A3C70E3C1B0E88E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="eddie_wagt_4-1654850379124.png" alt="eddie_wagt_4-1654850379124.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Eddie&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 08:39:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Line-chart-with-2-dimensions-1-dimension-with-buckets-and-1/m-p/1942021#M77601</guid>
      <dc:creator>eddie_wagt</dc:creator>
      <dc:date>2022-06-10T08:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart with 2 dimensions ( 1 dimension with buckets) and 1 measures</title>
      <link>https://community.qlik.com/t5/App-Development/Line-chart-with-2-dimensions-1-dimension-with-buckets-and-1/m-p/1942029#M77602</link>
      <description>&lt;P&gt;One more thing. It's performance is bad. Maybe you could change the input box type to a user input box. Maybe that is better. But still, because the variables are being updated each time you make changes, and we are making use here of a calculated dimension with a dynamic measure... it is really bad for the user experience. Maybe there are other Qlikkies who have a better solution for this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the buckets are not frequently changing you can consider a input sheet in Excel (maybe for multiple user groups) and use this Excel in the loadscript with the first solution I provided. Or you could have a look at the Vizlib extentions for user input (or other extensions).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 08:49:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Line-chart-with-2-dimensions-1-dimension-with-buckets-and-1/m-p/1942029#M77602</guid>
      <dc:creator>eddie_wagt</dc:creator>
      <dc:date>2022-06-10T08:49:42Z</dc:date>
    </item>
  </channel>
</rss>

