<?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 Question with Straight table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Question-with-Straight-table/m-p/246561#M93971</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a requirement to add a column 'Rating' next to Sales.&amp;nbsp; Where rating should be Good if sales is greater than 800k. And rating should be Ok if Sales is between 600K-800K and Bad if Sales is &amp;lt;600K.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already have City and Sales in the Straight table.&amp;nbsp; I am trying to add the column Rating using if condition in the expression, but I am finding it hard to make it work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea on this would be appreciated.&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, 03 Aug 2011 13:57:52 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-08-03T13:57:52Z</dc:date>
    <item>
      <title>Question with Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Question-with-Straight-table/m-p/246561#M93971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a requirement to add a column 'Rating' next to Sales.&amp;nbsp; Where rating should be Good if sales is greater than 800k. And rating should be Ok if Sales is between 600K-800K and Bad if Sales is &amp;lt;600K.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already have City and Sales in the Straight table.&amp;nbsp; I am trying to add the column Rating using if condition in the expression, but I am finding it hard to make it work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea on this would be appreciated.&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, 03 Aug 2011 13:57:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-with-Straight-table/m-p/246561#M93971</guid>
      <dc:creator />
      <dc:date>2011-08-03T13:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Question with Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Question-with-Straight-table/m-p/246562#M93972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to create an expression in your straight table like this :&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;if(Sales&amp;gt;800000, 'Good', if(Sales&amp;lt;600000, 'Bad', 'Ok'))&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I consider your first expression nammed " Sales ".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 14:44:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-with-Straight-table/m-p/246562#M93972</guid>
      <dc:creator>martin</dc:creator>
      <dc:date>2011-08-03T14:44:20Z</dc:date>
    </item>
    <item>
      <title>Question with Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Question-with-Straight-table/m-p/246563#M93973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there &lt;/P&gt;&lt;P&gt;try a new expression similar to this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Sales &amp;gt;&amp;nbsp; 500, 'Very Good',&lt;/P&gt;&lt;P&gt;if(Sales &amp;gt;&amp;nbsp;&amp;nbsp; 50,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Good',&lt;/P&gt;&lt;P&gt;if(Sales &amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'OK', &lt;/P&gt;&lt;P&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;&amp;nbsp;&amp;nbsp; 'Poor' // all the rest &lt;/P&gt;&lt;P&gt;)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HtH&lt;/P&gt;&lt;P&gt;Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 14:50:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-with-Straight-table/m-p/246563#M93973</guid>
      <dc:creator />
      <dc:date>2011-08-03T14:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Question with Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Question-with-Straight-table/m-p/246564#M93974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Martin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you said I used: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Sum(SalesPrice)&amp;gt;800000, 'Good', if(Sum(SalesPrice)&amp;lt;600000, 'Bad', 'Ok'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it gives me result as below.&amp;nbsp; This looks wrong.&amp;nbsp; &lt;/P&gt;&lt;P&gt;﻿&lt;IMG alt="QV.jpg" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/6268_QV.jpg" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 14:50:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-with-Straight-table/m-p/246564#M93974</guid>
      <dc:creator />
      <dc:date>2011-08-03T14:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Question with Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Question-with-Straight-table/m-p/246565#M93975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Roland.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Let me rephrase it.&amp;nbsp; I have three column.&amp;nbsp; &lt;/P&gt;&lt;P&gt;1. Region&lt;/P&gt;&lt;P&gt;2. Sum(Sales)&lt;/P&gt;&lt;P&gt;3. Rating according to the Sum(Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried &lt;/P&gt;&lt;P&gt;if(Sum(SalesPrice) &amp;gt;&amp;nbsp; 800000, 'Good',&lt;/P&gt;&lt;P&gt;if(Sum(SalesPrice) &amp;lt;&amp;nbsp;&amp;nbsp; 600000,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Bad',&lt;/P&gt;&lt;P&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;&amp;nbsp;&amp;nbsp; 'Ok' // all the rest&lt;/P&gt;&lt;P&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it gives me 'Good' for all Regions. &lt;/P&gt;&lt;P&gt;But I should get &lt;/P&gt;&lt;P&gt;MidWest- Bad&lt;/P&gt;&lt;P&gt;NorthEast- Ok&lt;/P&gt;&lt;P&gt;SouthEast- Good&lt;/P&gt;&lt;P&gt;SouthWest Bad&lt;/P&gt;&lt;P&gt;West - Ok&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Guide me on this!&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 15:00:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-with-Straight-table/m-p/246565#M93975</guid>
      <dc:creator />
      <dc:date>2011-08-03T15:00:33Z</dc:date>
    </item>
    <item>
      <title>Question with Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Question-with-Straight-table/m-p/246566#M93976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please attach a sample application so that your data structure could also be evaluated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 15:05:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-with-Straight-table/m-p/246566#M93976</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2011-08-03T15:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: Question with Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Question-with-Straight-table/m-p/246567#M93977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Toni.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I am attaching the file.&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, 03 Aug 2011 15:27:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-with-Straight-table/m-p/246567#M93977</guid>
      <dc:creator />
      <dc:date>2011-08-03T15:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Question with Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Question-with-Straight-table/m-p/246568#M93978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look at your Sales column:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;=num(sum(&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;if(YTD,&lt;/STRONG&gt;&lt;/SPAN&gt; SalesPrice&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;), '$#,##0;($#,##0)')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, how is your rating supposed to work if it's only doing a sum(SalesPrice)?&amp;nbsp; It's ignoring the YTD flag.&amp;nbsp; In any case, you don't need to restate the whole expression.&amp;nbsp; Just refer to the sales column directly by its label, like I believe Martin and Roland were saying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if(Sales &amp;gt; 800000, 'Good', if(Sales &amp;lt; 600000, 'Bad', 'Ok'))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 20:04:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-with-Straight-table/m-p/246568#M93978</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-08-03T20:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Question with Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Question-with-Straight-table/m-p/246569#M93979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, Got it Thanks John.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks all!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 20:40:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-with-Straight-table/m-p/246569#M93979</guid>
      <dc:creator />
      <dc:date>2011-08-03T20:40:12Z</dc:date>
    </item>
  </channel>
</rss>

