<?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: Select an specific date value by dimension in set analysis when using a date range in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1696197#M725928</link>
    <description>&lt;P&gt;Hi have worked for one expression and left some for you.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_savoring_food:"&gt;😋&lt;/span&gt; . The main change in expression is use of dimensionality() and replacing set analysis with IF.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;If([Date_Operation] &amp;gt;='$(=date(vStartDate))' and [Date_Operation]&amp;lt;='$(=date(vEndDate))',
	If( Dimensionality()=2
	,Aggr( sum(TOTAL &amp;lt;Ticker&amp;gt; If([Date_Operation] ='$(=date(vStartDate-1))', Aggregate_Diary_PL_Stock_Accum)), Date_Operation,Ticker)
	  ,sum(TOTAL {&amp;lt;[Date_Operation] = {"$(=date(vStartDate-1))"}&amp;gt;} Aggregate_Diary_PL_Stock_Accum)
	)
	,
	0
	)   &lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 509px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/32357iCC4A79352DE66B9B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Apr 2020 15:03:56 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2020-04-23T15:03:56Z</dc:date>
    <item>
      <title>Select an specific date value by dimension in set analysis when using a date range</title>
      <link>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1694547#M725916</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In one column I'm using a set analysis expression to get all sum(values) between a date range.&lt;/P&gt;&lt;P&gt;Example:&amp;nbsp;sum({&amp;lt;[Date_Operation] = {"&amp;gt;=$(=date(vStartDate))&amp;lt;=$(=date(vEndDate))"}&amp;gt;} Aggregate_Diary_PL_Stock_Accum)&lt;/P&gt;&lt;P&gt;With this expression there's no problem and I can get the corresponding value for each dimension in each date.&lt;/P&gt;&lt;P&gt;In another column I'm using set analysis to get the sum(values) in a specific date "vStartDate-1"&lt;/P&gt;&lt;P&gt;Example:&amp;nbsp;sum(total {&amp;lt;[Date_Operation] = {"$(=date(vStartDate-1))"}&amp;gt;} Aggregate_Diary_PL_Stock_Accum)&lt;/P&gt;&lt;P&gt;The problem that I have with that expression is that I need to use 'total' to get the sum(values) correctly, but then I can't get the value for each dimension.&lt;/P&gt;&lt;P&gt;I've already tried total &amp;lt;dimension&amp;gt; but it doesn't work... it only works when using&amp;nbsp;vEndDate intead of&amp;nbsp;vStartDate-1, that's why I suppose that the problem is the Date_Operation of each row.&lt;/P&gt;&lt;P&gt;So, In the second expression I would have to avoid the&amp;nbsp;Date_Operation field, but I can't manage it.&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:46:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1694547#M725916</guid>
      <dc:creator>wale_martins</dc:creator>
      <dc:date>2024-11-16T18:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Select an specific date value by dimension in set analysis when using a date range</title>
      <link>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1695580#M725917</link>
      <description>&lt;P&gt;Sorry to bother you&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;,&amp;nbsp;but there is no reply to my post and I'm sure that you have the solution.&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Wale&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 08:34:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1695580#M725917</guid>
      <dc:creator>wale_martins</dc:creator>
      <dc:date>2020-04-22T08:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Select an specific date value by dimension in set analysis when using a date range</title>
      <link>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1695589#M725918</link>
      <description>&lt;P&gt;I guess you are on the right path, &lt;STRONG&gt;Total&lt;/STRONG&gt; is required to be used here. Could you explain with a sample or screenshot what you are getting using total identifier and what you are looking for?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 08:51:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1695589#M725918</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2020-04-22T08:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: Select an specific date value by dimension in set analysis when using a date range</title>
      <link>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1695628#M725919</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22949"&gt;@tresB&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for your reply. Attached you have an example.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Collapsed Data&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In that case 'P&amp;amp;L StockAccum.' calculation is correct. 4,343.98 is the correct total (all tickers) value for 'date(vStartDate-1)'&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Expanded Data (Example 30 January)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In that case&amp;nbsp;'P&amp;amp;L StockAccum.' calculation is incorrect. As you can see, for each ticker I'm assigning the&amp;nbsp;'date(vStartDate-1)' total (all tickers) value and not the ticker one.&lt;/P&gt;&lt;P&gt;I don't know if I'm explaining myself well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 09:31:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1695628#M725919</guid>
      <dc:creator>wale_martins</dc:creator>
      <dc:date>2020-04-22T09:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Select an specific date value by dimension in set analysis when using a date range</title>
      <link>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1695639#M725920</link>
      <description>&lt;P&gt;A sample qv file would have been of more help in knowing what expression, dimensions...you are using. Could you share one? Else, help explaining the dimensions you are using in chart (possibly pivot) and exact expression you are using.&lt;/P&gt;&lt;P&gt;Assuming you are expecting different number for every tickers, in other words, respect the ticker dimension.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 09:43:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1695639#M725920</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2020-04-22T09:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Select an specific date value by dimension in set analysis when using a date range</title>
      <link>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1695683#M725921</link>
      <description>&lt;P&gt;Sorry&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22949"&gt;@tresB&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;But I can't share the qv file (sensitive information in it). Let me prepare a sample. I'll attach it as soon as possible.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 11:12:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1695683#M725921</guid>
      <dc:creator>wale_martins</dc:creator>
      <dc:date>2020-04-22T11:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Select an specific date value by dimension in set analysis when using a date range</title>
      <link>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1695783#M725922</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22949"&gt;@tresB&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Attached you have a qv example with its dataset&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;&lt;P&gt;Wale&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 14:48:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1695783#M725922</guid>
      <dc:creator>wale_martins</dc:creator>
      <dc:date>2020-04-22T14:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Select an specific date value by dimension in set analysis when using a date range</title>
      <link>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1695790#M725923</link>
      <description>&lt;P&gt;sorry&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22949"&gt;@tresB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This qv file will be clerarer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 15:07:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1695790#M725923</guid>
      <dc:creator>wale_martins</dc:creator>
      <dc:date>2020-04-22T15:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Select an specific date value by dimension in set analysis when using a date range</title>
      <link>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1696024#M725924</link>
      <description>&lt;P&gt;What if you try :&lt;/P&gt;&lt;P&gt;sum(&lt;STRONG&gt; total &amp;lt;Ticker&amp;gt;&amp;nbsp;&lt;/STRONG&gt; {&amp;lt;[Date_Operation] = {"$(=date(vStartDate-1))"}&amp;gt;} Aggregate_Diary_PL_Stock_Accum)&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 08:45:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1696024#M725924</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2020-04-23T08:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Select an specific date value by dimension in set analysis when using a date range</title>
      <link>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1696071#M725925</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22949"&gt;@tresB&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;That was one of the first options that I tried... but all values were converted into "0"&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 10:36:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1696071#M725925</guid>
      <dc:creator>wale_martins</dc:creator>
      <dc:date>2020-04-23T10:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: Select an specific date value by dimension in set analysis when using a date range</title>
      <link>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1696091#M725926</link>
      <description>&lt;P&gt;Could you please explain the expected output w.r.t the attached sample - to be sure?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 11:28:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1696091#M725926</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2020-04-23T11:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Select an specific date value by dimension in set analysis when using a date range</title>
      <link>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1696107#M725927</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22949"&gt;@tresB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your time. Attached you have the expected data (red).&amp;nbsp; P&amp;amp;L StockAccum. (2) should be the 31/01/19 P&amp;amp;L StockAccum. (2) for each ticker and not the total in each ticker.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 11:59:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1696107#M725927</guid>
      <dc:creator>wale_martins</dc:creator>
      <dc:date>2020-04-23T11:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Select an specific date value by dimension in set analysis when using a date range</title>
      <link>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1696197#M725928</link>
      <description>&lt;P&gt;Hi have worked for one expression and left some for you.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_savoring_food:"&gt;😋&lt;/span&gt; . The main change in expression is use of dimensionality() and replacing set analysis with IF.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;If([Date_Operation] &amp;gt;='$(=date(vStartDate))' and [Date_Operation]&amp;lt;='$(=date(vEndDate))',
	If( Dimensionality()=2
	,Aggr( sum(TOTAL &amp;lt;Ticker&amp;gt; If([Date_Operation] ='$(=date(vStartDate-1))', Aggregate_Diary_PL_Stock_Accum)), Date_Operation,Ticker)
	  ,sum(TOTAL {&amp;lt;[Date_Operation] = {"$(=date(vStartDate-1))"}&amp;gt;} Aggregate_Diary_PL_Stock_Accum)
	)
	,
	0
	)   &lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 509px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/32357iCC4A79352DE66B9B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 15:03:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1696197#M725928</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2020-04-23T15:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: Select an specific date value by dimension in set analysis when using a date range</title>
      <link>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1696390#M725929</link>
      <description>&lt;P&gt;awesome&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22949"&gt;@tresB&lt;/a&gt;,&amp;nbsp;thank you very much! If one day you know how to do it in set analysis, please let me know! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 08:14:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-an-specific-date-value-by-dimension-in-set-analysis-when/m-p/1696390#M725929</guid>
      <dc:creator>wale_martins</dc:creator>
      <dc:date>2020-04-24T08:14:17Z</dc:date>
    </item>
  </channel>
</rss>

