<?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: Using calculated dimensions to dictate what rows to display in straight chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-calculated-dimensions-to-dictate-what-rows-to-display-in/m-p/1270701#M516576</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To answer your question about using expressions...I think it is just my old school way of thinking regarding what is a dimension and what is a fact/measure/expression so I just never entertained this approach.&amp;nbsp; Your qvw seems to work nicely (and surprisingly easy), thank you so much.&amp;nbsp; Just one question, however, could this break if the sort changes either by the user double clicking a column header of the chart or if the Sort tab in the properties for the chart changes?&amp;nbsp; I'm not that familiar with how FirstSortedValue works and if it is has certain dependencies.&amp;nbsp; Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Mar 2017 17:13:22 GMT</pubDate>
    <dc:creator>kdmarkee</dc:creator>
    <dc:date>2017-03-15T17:13:22Z</dc:date>
    <item>
      <title>Using calculated dimensions to dictate what rows to display in straight chart</title>
      <link>https://community.qlik.com/t5/QlikView/Using-calculated-dimensions-to-dictate-what-rows-to-display-in/m-p/1270697#M516572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm hoping someone can point out where I'm going wrong as I've spend a day on this and can't quite nail it down.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Here is the &lt;STRONG&gt;raw data&lt;/STRONG&gt; I have&lt;/SPAN&gt;:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="155986" alt="raw data.PNG" class="jive-image image-1" src="/legacyfs/online/155986_raw data.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;My &lt;STRONG&gt;desired result&lt;/STRONG&gt; is the following&lt;/SPAN&gt;:&amp;nbsp; show the first note time with its corresponding type and text, grouped by user, date, account and incident, and then also include the number of notes at that grouping&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="156005" alt="desired result.PNG" class="jive-image image-2" src="/legacyfs/online/156005_desired result.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;my dimensions are: User, Note Date, Account, Incident, Type, Note Text, and 2 calculated dimensions…described below&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;1)&amp;nbsp; Note Time&lt;/SPAN&gt; - which is going to be first note time with this aggr statement, and the set analysis is just looking for notes withing within a date range set in 2 input boxes, and notes that ...&lt;/P&gt;&lt;P&gt;Aggr(&lt;/P&gt;&lt;P&gt;Min(&lt;/P&gt;&lt;P&gt;{$&amp;lt;[Note Date]={"$(= '&amp;gt;=' &amp;amp; vNoteStartDate) $(= '&amp;lt;=' &amp;amp; vNoteEndDate)"},[ExcludeNoteFlag]={'No'}&amp;gt;}&lt;/P&gt;&lt;P&gt;[Note Time]),&lt;/P&gt;&lt;P&gt;[User], [Note Date], [Account], [Incident])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;2) show row flag&lt;/SPAN&gt; - this is used to conditionally show the row by checking the dimension to &lt;STRONG&gt;Suppress When Value is Null&lt;/STRONG&gt;, nad by setting the field on the Presentation tab to &lt;STRONG&gt;Hide&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Aggr()&lt;/P&gt;&lt;P&gt;If([Note Time] = Min({$&amp;lt;[Note Date]={"$(= '&amp;gt;=' &amp;amp; vNoteStartDate) $(= '&amp;lt;=' &amp;amp; vNoteEndDate)"},[ExcludeNoteFlag]={'No'}&amp;gt;}[Note Time]),'Yes'),&lt;/P&gt;&lt;P&gt;[User], [Note Date], [Account], [Incident])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;AND my expression for note count is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Aggr(&lt;/P&gt;&lt;P&gt;count(&lt;/P&gt;&lt;P&gt;{$&amp;lt;[Note Date]={"$(= '&amp;gt;=' &amp;amp; vNoteStartDate) $(= '&amp;lt;=' &amp;amp; vNoteEndDate)"},[ExcludeNoteFlag]={'No'}&amp;gt;} [NoteCounter]),&lt;/P&gt;&lt;P&gt;[User], [Note Date], [Account], [Incident])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But for some reason I sometimes get this as the result and I don't know why, where the yellow cells are null:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="156006" alt="bad result.PNG" class="jive-image image-3" src="/legacyfs/online/156006_bad result.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice on what to try would be greatly appreciated.&amp;nbsp; Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 22:49:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-calculated-dimensions-to-dictate-what-rows-to-display-in/m-p/1270697#M516572</guid>
      <dc:creator>kdmarkee</dc:creator>
      <dc:date>2017-03-10T22:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using calculated dimensions to dictate what rows to display in straight chart</title>
      <link>https://community.qlik.com/t5/QlikView/Using-calculated-dimensions-to-dictate-what-rows-to-display-in/m-p/1270698#M516573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've attached a sample qvw if anyone want to take a stab at this for me.&amp;nbsp; Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2017 16:53:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-calculated-dimensions-to-dictate-what-rows-to-display-in/m-p/1270698#M516573</guid>
      <dc:creator>kdmarkee</dc:creator>
      <dc:date>2017-03-15T16:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using calculated dimensions to dictate what rows to display in straight chart</title>
      <link>https://community.qlik.com/t5/QlikView/Using-calculated-dimensions-to-dictate-what-rows-to-display-in/m-p/1270699#M516574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a reason you are using Note Time and Note Text as dimension, would you be okay to use them as expressions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2017 16:55:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-calculated-dimensions-to-dictate-what-rows-to-display-in/m-p/1270699#M516574</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-15T16:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using calculated dimensions to dictate what rows to display in straight chart</title>
      <link>https://community.qlik.com/t5/QlikView/Using-calculated-dimensions-to-dictate-what-rows-to-display-in/m-p/1270700#M516575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/156400_Capture.PNG" style="height: 176px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2017 16:58:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-calculated-dimensions-to-dictate-what-rows-to-display-in/m-p/1270700#M516575</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-15T16:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using calculated dimensions to dictate what rows to display in straight chart</title>
      <link>https://community.qlik.com/t5/QlikView/Using-calculated-dimensions-to-dictate-what-rows-to-display-in/m-p/1270701#M516576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To answer your question about using expressions...I think it is just my old school way of thinking regarding what is a dimension and what is a fact/measure/expression so I just never entertained this approach.&amp;nbsp; Your qvw seems to work nicely (and surprisingly easy), thank you so much.&amp;nbsp; Just one question, however, could this break if the sort changes either by the user double clicking a column header of the chart or if the Sort tab in the properties for the chart changes?&amp;nbsp; I'm not that familiar with how FirstSortedValue works and if it is has certain dependencies.&amp;nbsp; Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2017 17:13:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-calculated-dimensions-to-dictate-what-rows-to-display-in/m-p/1270701#M516576</guid>
      <dc:creator>kdmarkee</dc:creator>
      <dc:date>2017-03-15T17:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using calculated dimensions to dictate what rows to display in straight chart</title>
      <link>https://community.qlik.com/t5/QlikView/Using-calculated-dimensions-to-dictate-what-rows-to-display-in/m-p/1270702#M516577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The result of the table won't change based on the sorting of the table. FirstSortedValue uses the second parameter to sort rather than sorting based on the table. I used this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=FirstSortedValue(Type, [Note Time])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the Note Time is positive, the expression will pick the Type where Note Time is the minimum. If I instead used this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;=FirstSortedValue(Type, -[Note Time])&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;the expression would have picked the type where Note time is the highest (note the negative sign to tell the expression that sorting is needed in descending order)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2017 17:16:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-calculated-dimensions-to-dictate-what-rows-to-display-in/m-p/1270702#M516577</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-15T17:16:39Z</dc:date>
    </item>
  </channel>
</rss>

