<?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: Help with writing expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070018#M929374</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny, I have attached the files with some sample data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Condition 1&lt;/STRONG&gt;:&amp;nbsp; expected result&lt;/P&gt;&lt;P&gt;If Rating is either A or B result should show ‘5’&lt;/P&gt;&lt;P&gt;If Rating is either D or F result should show ‘10’&lt;/P&gt;&lt;P&gt;If Rating is C result should show ‘15’&lt;/P&gt;&lt;P&gt;If rating is neither A nor B nor D nor F nor C then result should show ‘N/A’&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Condition2&lt;/STRONG&gt; : expected result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Rating is null, it should show ‘ Not Rated’&lt;/P&gt;&lt;P&gt;If Rating is either D or F it should show&amp;nbsp; that particular rating –ABC Avg&lt;/P&gt;&lt;P&gt;If &lt;span class="lia-unicode-emoji" title=":anguished_face:"&gt;😧&lt;/span&gt; D-ABC Avg&lt;/P&gt;&lt;P&gt;If F: F-ABC Avg&lt;/P&gt;&lt;P&gt;Anything apart from above conditions it should show that particular rating&amp;nbsp; Avg&lt;/P&gt;&lt;P&gt;Example: if rating is G it should show : G Avg &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Condition 3&lt;/STRONG&gt; expected result( %): Event Example.qvw&lt;/P&gt;&lt;P&gt;What I am expecting in the result is :&lt;/P&gt;&lt;P&gt;We have count (ID) of Event A =2 and Total&amp;nbsp; count of ID’s= 5&lt;/P&gt;&lt;P&gt;Expected result = 2/5*100= 40%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly Event B expected result= 3/5*100= 60%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Mar 2016 14:42:05 GMT</pubDate>
    <dc:creator>aarohipatel</dc:creator>
    <dc:date>2016-03-16T14:42:05Z</dc:date>
    <item>
      <title>Help with writing expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070012#M929368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I need help with writing the following conditions in QV expression of straight table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ratio1=&amp;nbsp; If ([ABC]=0) Then 0 Else ([feild2]/[ABC])&lt;/P&gt;&lt;P&gt;ABC= count(field1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ratio2= If([ABC]=0) Then 0 Else ([XYZ]/[ABC])&lt;/P&gt;&lt;P&gt;ABC= count(field1)&lt;/P&gt;&lt;P&gt;XYZ= sum(field2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UVW =If(([Count(field)]-[field2])=0) Then 0 Else ([field3]/([Count(field1)]-[field2]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LMN = If( ([field 1] In List ("A" ; "B")) )Then "10" Else If( ([field1] InList("D" ; "F")) )Then "15"&amp;nbsp; ElseIf( ([field1]="C") )Then "12"&amp;nbsp; Else "N/A"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070012#M929368</guid>
      <dc:creator>aarohipatel</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help with writing expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070013#M929369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share some data with expected output? It would be easier to resolve this with the data, rather then trying to decode your provided code &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2016 17:13:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070013#M929369</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-14T17:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Help with writing expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070014#M929370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to provide some data through screenshots. Hope it works&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/117952_Untitled.png" style="height: 324px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;In this ,&amp;nbsp;&amp;nbsp; Count (ABC) and field 2 has its values in #’s.&lt;/P&gt;&lt;P&gt;In the Ratio column, I would expect to see that: if Count(ABC) is ‘0’ then&amp;nbsp; RATIO should display ‘0’ orelse it should display (33/3) which is 11. I want to see '11' in RATIO column &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P&gt;Ratio2 I would like to see ‘0’ if Count(ABC)=0 orelse&amp;nbsp; it should display Sum(XYZ)/Count(ABC)&lt;/P&gt;&lt;P&gt;66/3= 22 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/117953_Untitled.png" style="height: 268px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Field 3 result' what I want to see is If field 3 is A or B then result should show ‘10’, if field 3 is ‘C’ result should show 12, if field 3 is D or F, result should show 15 if field 3 is not A,B,C,D,F result should show’N/A’&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2016 18:20:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070014#M929370</guid>
      <dc:creator>aarohipatel</dc:creator>
      <dc:date>2016-03-14T18:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help with writing expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070015#M929371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try this for &lt;STRONG&gt;RATIO&lt;/STRONG&gt; -&amp;gt; &lt;STRONG&gt;Alt((Field2/Count(ABC)), 0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and &lt;STRONG&gt;RATIO2&lt;/STRONG&gt; -&amp;gt; &lt;STRONG&gt;Alt((Sum(XYZ)/Count(ABC)), 0)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2016 18:45:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070015#M929371</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-14T18:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help with writing expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070016#M929372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not able to see the expected results using the above expressions.&lt;/P&gt;&lt;P&gt;I will try to create some test data and share it with you so that you will be able to help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2016 19:08:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070016#M929372</guid>
      <dc:creator>aarohipatel</dc:creator>
      <dc:date>2016-03-14T19:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help with writing expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070017#M929373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ya that would be very helpful &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2016 19:27:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070017#M929373</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-14T19:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help with writing expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070018#M929374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny, I have attached the files with some sample data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Condition 1&lt;/STRONG&gt;:&amp;nbsp; expected result&lt;/P&gt;&lt;P&gt;If Rating is either A or B result should show ‘5’&lt;/P&gt;&lt;P&gt;If Rating is either D or F result should show ‘10’&lt;/P&gt;&lt;P&gt;If Rating is C result should show ‘15’&lt;/P&gt;&lt;P&gt;If rating is neither A nor B nor D nor F nor C then result should show ‘N/A’&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Condition2&lt;/STRONG&gt; : expected result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Rating is null, it should show ‘ Not Rated’&lt;/P&gt;&lt;P&gt;If Rating is either D or F it should show&amp;nbsp; that particular rating –ABC Avg&lt;/P&gt;&lt;P&gt;If &lt;span class="lia-unicode-emoji" title=":anguished_face:"&gt;😧&lt;/span&gt; D-ABC Avg&lt;/P&gt;&lt;P&gt;If F: F-ABC Avg&lt;/P&gt;&lt;P&gt;Anything apart from above conditions it should show that particular rating&amp;nbsp; Avg&lt;/P&gt;&lt;P&gt;Example: if rating is G it should show : G Avg &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Condition 3&lt;/STRONG&gt; expected result( %): Event Example.qvw&lt;/P&gt;&lt;P&gt;What I am expecting in the result is :&lt;/P&gt;&lt;P&gt;We have count (ID) of Event A =2 and Total&amp;nbsp; count of ID’s= 5&lt;/P&gt;&lt;P&gt;Expected result = 2/5*100= 40%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly Event B expected result= 3/5*100= 60%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 14:42:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070018#M929374</guid>
      <dc:creator>aarohipatel</dc:creator>
      <dc:date>2016-03-16T14:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help with writing expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070019#M929375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For condition 1, you can use this expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(IsNull(RATING), 'N/A', Pick(Match(RATING, 'A', 'B', 'C', 'D', 'F') + 1, 'N/A', 5, 5, 15, 10, 10))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/118308_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For condition 2, where do I get the numbers from? Condition1?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 20:29:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070019#M929375</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-16T20:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help with writing expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070020#M929376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny, Condition 1 works. Yes, same data for condition2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 20:43:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070020#M929376</guid>
      <dc:creator>aarohipatel</dc:creator>
      <dc:date>2016-03-16T20:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with writing expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070021#M929377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Hi Sunny, any update on the 2nd and 3rd condition?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;I tried this for condition 2:&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Rating&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;),'Not Rated', &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Rating&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;= Valuelist( ‘D’,'F'),&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;Concat&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Rating&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;,'-PAR Avg'),&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;Concat&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Rating&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;,'Avg')))&lt;BR /&gt;&lt;BR /&gt;But it is not working. Please suggest&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;Also, I need help with one more condition.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;Condition4:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;If I select 2016/01, the variance should show Count(2016/01 Request ID) - Count(2015/01 Request ID)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;Example: 2016/01 Count( Request ID= 4 and Count(2015/01 Request ID ) = 5&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;Variance= 4-5= -1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;What I am trying to achieve is I am calculating the variance of current year and prior year for the same month. Attached is some sample info.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;Looking forward for your reply.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A _jive_internal="true" class="j-attachment-icon" href="https://community.qlik.com/servlet/JiveServlet/download/1000962-217096/Sample data for condition 4.xlsx" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3778c7;"&gt;&lt;/A&gt;&lt;SPAN class="clearfix j-attachment-info" style="margin: 0 0 0 6px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/servlet/JiveServlet/download/1000962-217096/Sample data for condition 4.xlsx" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3778c7;"&gt;Sample data for condition 4.xlsx&lt;/A&gt;&lt;SPAN class="font-color-meta j-attach-meta" style="font-weight: bold; font-style: inherit; font-size: 11px; font-family: inherit; color: #8b8b8b;"&gt;8.9 K &lt;A _jive_internal="true" href="https://community.qlik.com/thread/209409" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #8ca9cd;"&gt;Preview&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2016 21:32:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070021#M929377</guid>
      <dc:creator>aarohipatel</dc:creator>
      <dc:date>2016-03-18T21:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help with writing expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070022#M929378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lets do this one at a time. Can you elaborate on your second condition again? Is ABC Avg a text that you want or is it the Avg of rating A, B and C? If it is the average, what are the values for ABC, how are they determined?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 09:53:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070022#M929378</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-21T09:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help with writing expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070023#M929379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Hi Sunny,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Condition 2:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Rating is a field whose values are alphabets. In the attached Rating Example.xls, ' RATING'&amp;nbsp; is the rating of the products.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Examples:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Rating of Tables is&amp;nbsp; 'A', in expression results, I want to see:&amp;nbsp; 'A Avg'&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Rating of Chairs is&amp;nbsp; 'B',&amp;nbsp; in expression results, I want to see: ' B Avg'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Rating of Fans&amp;nbsp; is&amp;nbsp; 'C' , in&amp;nbsp; expression results, I want to see:&amp;nbsp; 'C Avg'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Rating of Bulbs&amp;nbsp; is&amp;nbsp; 'D', in&amp;nbsp; expression results, I want to see: ' &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;D-ABC Avg'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Rating of Sofa&amp;nbsp; is&amp;nbsp; 'E' , in&amp;nbsp; expression results, I want to see:&amp;nbsp; 'E Avg'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Rating of Beds&amp;nbsp; is&amp;nbsp; 'F', in&amp;nbsp; expression results, I want to see:&amp;nbsp; 'F&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;-ABC Avg'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Rating of Sofa&amp;nbsp; is&amp;nbsp; 'G' , in expression results, I want to see: ' G Avg'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Rating of Sheets is null,&amp;nbsp; in Expression results, I want to see: 'Not Rated'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;All the expected results are text. 'A Avg' ; D-ABC Avg', 'Not Rated' are all texts.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Thanks &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 13:16:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070023#M929379</guid>
      <dc:creator>aarohipatel</dc:creator>
      <dc:date>2016-03-21T13:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: Help with writing expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070024#M929380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the expression for 2nd condition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(IsNull(RATING), 'Not Rated', If(not Match(RATING, 'D', 'F'), RATING &amp;amp; ' Avg', RATING &amp;amp; '-ABC Avg'))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/118783_Capture.PNG" style="height: auto;" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is what you want, lets move to the third requirement &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 13:26:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070024#M929380</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-21T13:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help with writing expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070025#M929381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your expression for third requirement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(Event)/Count (TOTAL Event)&lt;/STRONG&gt;&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/118797_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 13:45:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070025#M929381</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-21T13:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Help with writing expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070026#M929382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;4th and final requirement&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/118806_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pay close attention to the data model here. As I added an As-of Table (&lt;A href="https://community.qlik.com/qlik-blogpost/4531"&gt;The As-Of Table&lt;/A&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 14:13:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070026#M929382</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-21T14:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Help with writing expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070027#M929383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All the answers provided (by Sunny T) for all 4 conditions are correct.Could mark only one answer as correct so mentioning it in this post&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Sunny for your patience and for&amp;nbsp; helping me with all 4 conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aarohi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 13:25:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070027#M929383</guid>
      <dc:creator>aarohipatel</dc:creator>
      <dc:date>2016-03-22T13:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help with writing expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070028#M929385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem at all. I am glad I was able to help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just so you know, there are helpful answers -&amp;gt; &lt;A href="https://community.qlik.com/docs/DOC-14806"&gt;Qlik Community Tip: Marking Replies as Correct or Helpful&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 14:10:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-writing-expression/m-p/1070028#M929385</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-22T14:10:04Z</dc:date>
    </item>
  </channel>
</rss>

