<?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: Bar Charts / Histograms &amp; Alternative Measures / Dimensions in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Alternative-Measures-Dimensions-or-Filters-Set-Analysis/m-p/1363719#M30682</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps your date fields doesn't contain dates, but text strings that look like dates. In that case you need to convert those text strings to date values first using the Date# function: &lt;EM&gt;Date#(date, 'YYYY-MM-DD') as date&lt;/EM&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 21 May 2017 07:41:03 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2017-05-21T07:41:03Z</dc:date>
    <item>
      <title>Alternative Measures / Dimensions or Filters &amp; Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Alternative-Measures-Dimensions-or-Filters-Set-Analysis/m-p/1363716#M30679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently discovering QlikSense and I don't know how to use all its features yet. I need some help using Bar Charts (or histograms) and alternative measures / dimensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have imported data from a csv file. A sample of the data would look like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="232" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" style="border: 1px solid #000000; width: 340px; height: 232px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Product&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Sales_id&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt;"&gt;&lt;STRONG&gt;P1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;id1&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;2017-05-01&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;&lt;SPAN style="color: #ff0000; text-align: center; font-size: 12pt;"&gt;&lt;STRONG&gt;P1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;id2&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;2017-05-01&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;&lt;SPAN style="color: #ff0000; text-align: center; font-size: 12pt;"&gt;&lt;STRONG&gt;P1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;id2&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;2017-05-01&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;&lt;SPAN style="color: #ff0000; text-align: center; font-size: 12pt;"&gt;&lt;STRONG&gt;P1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;id4&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;2017-05-02&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;&lt;SPAN style="color: #ff0000; text-align: center; font-size: 12pt;"&gt;&lt;STRONG&gt;P1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;id5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;2017-05-02&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;&lt;SPAN style="; text-align: center; color: #3366ff; font-size: 12pt;"&gt;&lt;STRONG&gt;P2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;id1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;2017-05-01&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;&lt;SPAN style="; text-align: center; color: #3366ff; font-size: 12pt;"&gt;&lt;STRONG&gt;P2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;id4&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;2017-05-02&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;&lt;SPAN style="; text-align: center; color: #3366ff; font-size: 12pt;"&gt;&lt;STRONG&gt;P2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;id6&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;2017-05-03&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a bar chart that will give the number of product sold per day for a specific product, but I want to be able to select the product on the chart. Here is the illustration of the result I would expect :&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="162157" alt="P1 (1).png" class="jive-image image-1" height="201" src="/legacyfs/online/162157_P1 (1).png" style="height: 200.697px; width: 357px;" width="357" /&gt;&lt;IMG __jive_id="162158" alt="P2 (1).png" class="jive-image image-2" height="190" src="/legacyfs/online/162158_P2 (1).png" style="height: 190.362px; width: 340px;" width="340" /&gt;&lt;/P&gt;&lt;P&gt;I think the pseudo code would be something like :&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if PRODUCT = 'P1'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; then X = Date&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y = Number of sales per day = Count( Sales_id )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;And for the alternative measure, the code would be the same but with the condition PRODUCT = 'P2', which would allow the user to select the product on the Y axis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to do this with QlikSense, and if so, how ?&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haroun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:49:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Alternative-Measures-Dimensions-or-Filters-Set-Analysis/m-p/1363716#M30679</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T09:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Charts / Histograms &amp; Alternative Measures / Dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/Alternative-Measures-Dimensions-or-Filters-Set-Analysis/m-p/1363717#M30680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The easy way out is to simply select the Product value you want to see the bars for. Add Product as dimension to the bar chart. Then simply select the Product value you wish to see. Unfortunately removing the selection can't be done from the chart itself. So you may want to add a Filter Pane object for the Product dimension instead and make the selections in the Filter Pane instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2017 16:59:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Alternative-Measures-Dimensions-or-Filters-Set-Analysis/m-p/1363717#M30680</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2017-05-05T16:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Charts / Histograms &amp; Alternative Measures / Dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/Alternative-Measures-Dimensions-or-Filters-Set-Analysis/m-p/1363718#M30681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the tip. &lt;SPAN style="font-size: 10pt;"&gt;I ended up using a filter pane because I didn't find any other option, but I wanted to use a solution more "script oriented", based on this structure : &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;Count( {&amp;lt;Product = {'P1'} &amp;gt;} sales_id) but with the possibility of adapting this for any value of the dimension Product.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;For another example : let's say I want to get the sum of all values for the minimum date of the table, I would write it like this :&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum({&amp;lt;date = {&lt;STRONG&gt;min(date)&lt;/STRONG&gt;} &amp;gt;} Value) &lt;EM&gt;or maybe even&lt;/EM&gt; Sum( if(date = &lt;STRONG&gt;min(date)&lt;/STRONG&gt;, Value )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;which would result here in 10+5+3+1 = 19&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;But the problem in my example seems to be &lt;STRONG&gt;min(date)&lt;/STRONG&gt; which is not interpreted by QlikSense, and only the string '2017-05-01' does work but I want to be able to do this without knowing the minimum date of my table for this calculation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Any further help on this topic would be appreciated thanks a lot&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 15:38:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Alternative-Measures-Dimensions-or-Filters-Set-Analysis/m-p/1363718#M30681</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-16T15:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Charts / Histograms &amp; Alternative Measures / Dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/Alternative-Measures-Dimensions-or-Filters-Set-Analysis/m-p/1363719#M30682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps your date fields doesn't contain dates, but text strings that look like dates. In that case you need to convert those text strings to date values first using the Date# function: &lt;EM&gt;Date#(date, 'YYYY-MM-DD') as date&lt;/EM&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 May 2017 07:41:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Alternative-Measures-Dimensions-or-Filters-Set-Analysis/m-p/1363719#M30682</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2017-05-21T07:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Charts / Histograms &amp; Alternative Measures / Dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/Alternative-Measures-Dimensions-or-Filters-Set-Analysis/m-p/1363720#M30683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I finally found the way to make it work. The proper expression is as follows :&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum({&amp;lt;date = {&lt;STRONG&gt;'$(&lt;/STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;=&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;EM&gt;min(date)&lt;/EM&gt;&lt;STRONG&gt;)'&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;} &amp;gt;} Value)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If I understood correctly the principle, it works like that :&lt;/P&gt;&lt;P&gt;- the &lt;EM&gt;''&lt;/EM&gt; are required because Dates are interpreted as string&lt;/P&gt;&lt;P&gt;- the &lt;EM&gt;$(= ... )&lt;/EM&gt; is needed to calculate the expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I also figured out the way to get the sum of value for a specific date range, I will put it there in case some people are wondering how to do it.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Example :&lt;/EM&gt; 2 variables are set, vMinDate for the minimum and vMaxDate for the maximum date of the interval we want to calculate.&lt;/P&gt;&lt;P&gt;To get the sum of the value between vMinDate and vMaxDate, you can use this expression :&lt;/P&gt;&lt;P&gt;Sum( {&amp;lt; date = { '&amp;gt;=$(=&lt;SPAN style="font-size: 13.3333px;"&gt;$(vMinDate)&lt;/SPAN&gt;)&lt;SPAN style="text-decoration: underline;"&gt;' , '&lt;/SPAN&gt;&amp;lt;=$(=&lt;SPAN style="font-size: 13.3333px;"&gt;$(vMaxDate)&lt;/SPAN&gt;)' } &amp;gt;} Value)&lt;/P&gt;&lt;P&gt;The underlined part is the equivalent of the logical "OR", but if you want to select the attributes that fit both criteria ("AND"), do not add the 'comma'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If my explanations weren't clear enough, or just for informative purposes on Set Analysis, I HIGHLY recommend these 2 videos on this topic by Michael Tarallo &lt;A href="https://community.qlik.com/qlik-users/77808"&gt;mto&lt;/A&gt;‌‌ which sums up very well how to get started with set analysis and gives a good glance of its possibilities :&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=YMQJnKMkfxg" style="font-size: 10pt;" title="https://www.youtube.com/watch?v=YMQJnKMkfxg"&gt;Beginners' Introduction to Set Analysis - Qlik Sense and QlikView - YouTube&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=nB-HJ8X1QbI" title="https://www.youtube.com/watch?v=nB-HJ8X1QbI"&gt;Set Analysis - Part 2 - Cool Stuff You can Do: Qlik Sense and QlikView - YouTube&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for the help and consideration.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haroun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jun 2017 14:30:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Alternative-Measures-Dimensions-or-Filters-Set-Analysis/m-p/1363720#M30683</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-27T14:30:03Z</dc:date>
    </item>
  </channel>
</rss>

