<?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: Error in an expression to get a value corresponding to the latest(max) date for each dimension v in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Error-in-an-expression-to-get-a-value-corresponding-to-the/m-p/1709175#M451649</link>
    <description>&lt;P&gt;Thanks Jwjackso. That worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jun 2020 20:27:27 GMT</pubDate>
    <dc:creator>karthick_hoag</dc:creator>
    <dc:date>2020-06-08T20:27:27Z</dc:date>
    <item>
      <title>Error in an expression to get a value corresponding to the latest(max) date for each dimension value</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-an-expression-to-get-a-value-corresponding-to-the/m-p/1706906#M451518</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;I need your help and expertise to solve an issue in writing an expression.&lt;/P&gt;&lt;P&gt;Here is the data:&lt;/P&gt;&lt;TABLE width="602px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="286px"&gt;METRIC_NAME&lt;/TD&gt;&lt;TD width="88px"&gt;EFF_DATE&lt;/TD&gt;&lt;TD width="88px"&gt;VALUE_01&lt;/TD&gt;&lt;TD width="139px"&gt;VALUE_01_DESC&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="286px"&gt;Access - Wait Times - Urgent Care (Door to Provider)&lt;/TD&gt;&lt;TD width="88px"&gt;43891&lt;/TD&gt;&lt;TD width="88px"&gt;3&lt;/TD&gt;&lt;TD width="139px"&gt;Average&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="286px"&gt;Access - Wait Times - Urgent Care (Door to Provider)&lt;/TD&gt;&lt;TD width="88px"&gt;43891&lt;/TD&gt;&lt;TD width="88px"&gt;3.4&lt;/TD&gt;&lt;TD width="139px"&gt;Average&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="286px"&gt;Access - Wait Times - Urgent Care (Door to Provider)&lt;/TD&gt;&lt;TD width="88px"&gt;43977&lt;/TD&gt;&lt;TD width="88px"&gt;0.1&lt;/TD&gt;&lt;TD width="139px"&gt;Average&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="286px"&gt;Access - Wait Times - Urgent Care (Door to Provider)&lt;/TD&gt;&lt;TD width="88px"&gt;43977&lt;/TD&gt;&lt;TD width="88px"&gt;0.4&lt;/TD&gt;&lt;TD width="139px"&gt;Average&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="286px"&gt;Admin Expense&lt;/TD&gt;&lt;TD width="88px"&gt;43891&lt;/TD&gt;&lt;TD width="88px"&gt;0&lt;/TD&gt;&lt;TD width="139px"&gt;Summation&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="286px"&gt;Admin Expense&lt;/TD&gt;&lt;TD width="88px"&gt;43891&lt;/TD&gt;&lt;TD width="88px"&gt;64.34&lt;/TD&gt;&lt;TD width="139px"&gt;Summation&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="286px"&gt;Admin Expense&lt;/TD&gt;&lt;TD width="88px"&gt;43891&lt;/TD&gt;&lt;TD width="88px"&gt;138.31&lt;/TD&gt;&lt;TD width="139px"&gt;Summation&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="286px"&gt;Admin Expense&lt;/TD&gt;&lt;TD width="88px"&gt;43922&lt;/TD&gt;&lt;TD width="88px"&gt;-22469.94&lt;/TD&gt;&lt;TD width="139px"&gt;Summation&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="286px"&gt;Admin Expense&lt;/TD&gt;&lt;TD width="88px"&gt;43922&lt;/TD&gt;&lt;TD width="88px"&gt;0&lt;/TD&gt;&lt;TD width="139px"&gt;Summation&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="286px"&gt;Admin Expense&lt;/TD&gt;&lt;TD width="88px"&gt;43922&lt;/TD&gt;&lt;TD width="88px"&gt;55&lt;/TD&gt;&lt;TD width="139px"&gt;Summation&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my requirement:&lt;/P&gt;&lt;P&gt;I need to get the Avg(VALUE_01) for a metric which has VALUE_01_DESC as Average for the latest Month. Similarly,&amp;nbsp;I need to get the Sum(VALUE_01) for a metric which has VALUE_01_DESC as Summation for the latest Month.&lt;/P&gt;&lt;P&gt;I have a straight table with METRIC_NAME as the dimension and the below expression:&lt;/P&gt;&lt;P&gt;&lt;U&gt;Expression:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;=if(VALUE_01_DESC = 'Average',&lt;BR /&gt;Avg({&amp;lt;EFF_DATE={"&amp;gt;=$(=Max(EFF_DATE))"}&amp;gt;}VALUE_01),&lt;/P&gt;&lt;P&gt;if(VALUE_01_DESC = 'Summation',Sum({&amp;lt;EFF_DATE={"&amp;gt;=$(=Max(EFF_DATE))"}&amp;gt;}VALUE_01)&lt;BR /&gt;))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not getting the expected o/p. Below is what I am getting as a result in the straight table:&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;TABLE width="192"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="96"&gt;METRIC_NAME&lt;/TD&gt;&lt;TD width="96"&gt;Expression&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Access - Wait Times - Urgent Care (Door to Provider)&lt;/TD&gt;&lt;TD&gt;0.25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Admin Expense&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Expression is not working as expected. I am sensing that the search string within set analysis to find out the max(EFF_DATE) per each METRIC_NAME is not working properly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, how to writ e the search string to get the max(EFF_DATE) corresponding to each dimension (METRIC_NAME) value?&lt;/P&gt;&lt;P&gt;I have to get the below table (Expected O/p):&lt;/P&gt;&lt;TABLE width="192"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="96"&gt;METRIC_NAME&lt;/TD&gt;&lt;TD width="96"&gt;Expression&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Access - Wait Times - Urgent Care (Door to Provider)&lt;/TD&gt;&lt;TD&gt;0.25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Admin Expense&lt;/TD&gt;&lt;TD&gt;-22414.94&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Karthick S&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:34:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-an-expression-to-get-a-value-corresponding-to-the/m-p/1706906#M451518</guid>
      <dc:creator>karthick_hoag</dc:creator>
      <dc:date>2024-11-16T00:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error in an expression to get a value corresponding to the latest(max) date for each dimension v</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-an-expression-to-get-a-value-corresponding-to-the/m-p/1706913#M451519</link>
      <description>&lt;P&gt;The Max(EFF_DATE) is 43977, which is for an Average.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=if(VALUE_01_DESC = 'Average',&lt;BR /&gt;Avg({&amp;lt;EFF_DATE={"&amp;gt;=$(=Max({1&amp;lt;VALUE_01_DESC={'Average'}&amp;gt;}EFF_DATE))"}&amp;gt;}VALUE_01),&lt;/P&gt;&lt;P&gt;if(VALUE_01_DESC = 'Summation',Sum({&amp;lt;EFF_DATE={"&amp;gt;=$(=Max({1&amp;lt;VALUE_01_DESC={'Summation'}&amp;gt;}EFF_DATE))"}&amp;gt;}VALUE_01)&lt;BR /&gt;))&lt;/P&gt;</description>
      <pubDate>Sun, 31 May 2020 17:04:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-an-expression-to-get-a-value-corresponding-to-the/m-p/1706913#M451519</guid>
      <dc:creator>jwjackso</dc:creator>
      <dc:date>2020-05-31T17:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Error in an expression to get a value corresponding to the latest(max) date for each dimension v</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-an-expression-to-get-a-value-corresponding-to-the/m-p/1709175#M451649</link>
      <description>&lt;P&gt;Thanks Jwjackso. That worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 20:27:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-an-expression-to-get-a-value-corresponding-to-the/m-p/1709175#M451649</guid>
      <dc:creator>karthick_hoag</dc:creator>
      <dc:date>2020-06-08T20:27:27Z</dc:date>
    </item>
  </channel>
</rss>

