<?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 Straight Table - Supressing Rows in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238631#M89459</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Attached is one solution. It took me less time than I expected. Basically, the chart has to behave as if only &lt;EM&gt;some&lt;/EM&gt; of the rows of data actually exist, specifically those rows with the lowest order type sequence. So I use script to add a flag that identifies those rows. The colunns then take the form of only({&amp;lt;Flag={'Y'}&amp;gt;} Field), keeping only those rows by using set analysis. Here's the script beyond what was in my previous post:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;LEFT JOIN (WorkOrder_Order)&lt;BR /&gt;LOAD ORDERNUMBER,ORDERLINE,ORDERTYPE as TEMPORDERTYPE&lt;BR /&gt;RESIDENT Orders&lt;BR /&gt;;&lt;BR /&gt;LEFT JOIN (WorkOrder_Order)&lt;BR /&gt;LOAD ORDERTYPE as TEMPORDERTYPE,ORDERTYPESEQUENCE as TEMPORDERTYPESEQUENCE&lt;BR /&gt;RESIDENT OrderTypeSequence&lt;BR /&gt;;&lt;BR /&gt;LEFT JOIN (WorkOrder_Order)&lt;BR /&gt;LOAD&lt;BR /&gt; WORKORDERNUMBER&lt;BR /&gt;,SEQUENCENUMBER&lt;BR /&gt;,min(TEMPORDERTYPESEQUENCE) as TEMPORDERTYPESEQUENCE&lt;BR /&gt;,'Y' as MINORDERTYPESEQUENCEFLAG&lt;BR /&gt;RESIDENT WorkOrder_Order&lt;BR /&gt;GROUP BY WORKORDERNUMBER,SEQUENCENUMBER&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;My earlier thought was to do all of that work in the set analysis itself, but it seemed easier to just do it in the script, and it will be faster to execute in the chart as well.&lt;/P&gt;&lt;P&gt;Now if you only need those specific rows EVERYWHERE, then you'd change the last left join into an inner join to get rid of the other rows, and even a simple table box would display the right data, no expressions required.&lt;/P&gt;&lt;P&gt;Oh, drop the temp fields at the end. I forgot to do that, but I'm too lazy to go back.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Mar 2011 20:33:21 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2011-03-04T20:33:21Z</dc:date>
    <item>
      <title>Straight Table - Supressing Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238624#M89452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm having difficulty conditionally suppressing a row in a straight table.&lt;/P&gt;&lt;P&gt;I've created a sample application that illustrates the problem. There are two main tables: WorkOrders and Orders and a third that joins the two together.&lt;/P&gt;&lt;P&gt;A WorkOrder can be associated to zero or more Orders. An Order can be associated to zero or more WorkOrders.&lt;/P&gt;&lt;P&gt;I'm trying to create a straight table that lists all of the WorkOrders and only one associated Order. If there are multiple orders then it should pick the one that is of type 'Dis'. Here is some sample data:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-3711_sourceID:3711" /&gt;&lt;/P&gt;&lt;P&gt;The line with the red arrow should be suppressed because the WORKORDERNUMBER/SEQUENCENUMBER combination already has a DIS order showing for it.&lt;/P&gt;&lt;P&gt;The closest I have come to making this work is associate a weighted value to ORDERTYPE and then use FirstSortedValue() in the expression to return the correct one. However, as soon as I start filtering on ORDERTYPE it would show the incorrect value.&lt;/P&gt;&lt;P&gt;I then tried to use set analysis on FirstSortedValue() to ignore the ORDERTYPE, however the ORDERTYPE filter still didn't work correctly. It would always show the correct value, but it wouldn't suppress it.&lt;/P&gt;&lt;P&gt;I've created a sample .qvw file to illustrate the problem.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-Ken&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 02:00:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238624#M89452</guid>
      <dc:creator />
      <dc:date>2011-03-04T02:00:21Z</dc:date>
    </item>
    <item>
      <title>Straight Table - Supressing Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238625#M89453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ken,&lt;/P&gt;&lt;P&gt;Couldn't understand ur problem do u mean to say that all item's with OrderType dis need to be suppressed.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 06:36:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238625#M89453</guid>
      <dc:creator>amars</dc:creator>
      <dc:date>2011-03-04T06:36:29Z</dc:date>
    </item>
    <item>
      <title>Straight Table - Supressing Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238626#M89454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ken,&lt;/P&gt;&lt;P&gt;cant understand ur probs.... think use 'distinct' in ur exp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 06:51:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238626#M89454</guid>
      <dc:creator />
      <dc:date>2011-03-04T06:51:12Z</dc:date>
    </item>
    <item>
      <title>Straight Table - Supressing Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238627#M89455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Amars,&lt;/P&gt;&lt;P&gt;Not quite, no.&lt;/P&gt;&lt;P&gt;If there is only one Order for a WorkOrder then it should be displayed - whatever it is.&lt;/P&gt;&lt;P&gt;If there are multiple Orders for a WorkOrder then it should only show the one that is of type Dis and suppress the Req.&lt;/P&gt;&lt;P&gt;-Ken&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 19:07:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238627#M89455</guid>
      <dc:creator />
      <dc:date>2011-03-04T19:07:28Z</dc:date>
    </item>
    <item>
      <title>Straight Table - Supressing Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238628#M89456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Srividhya,&lt;/P&gt;&lt;P&gt;I'm not sure how DISTINCT would help? I need to conditionally suppress a line that is already unique. Hopefully my comment to amars helps to clarify what I'm after.&lt;/P&gt;&lt;P&gt;-Ken&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 19:11:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238628#M89456</guid>
      <dc:creator />
      <dc:date>2011-03-04T19:11:22Z</dc:date>
    </item>
    <item>
      <title>Straight Table - Supressing Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238629#M89457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe the attached file at least explains the problem a little better. Basically, I implemented the "solution" that you tried, and described why the results were wrong, and which rows needed to be suppressed and when. Please let me know if I've understood the problem.&lt;/P&gt;&lt;P&gt;I think I understand conceptually how to solve it, but now I need to figure out how to translate my basic idea into actual code. No guarantee that it'll work, but I'm hopeful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 20:00:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238629#M89457</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-03-04T20:00:15Z</dc:date>
    </item>
    <item>
      <title>Straight Table - Supressing Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238630#M89458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey John,&lt;/P&gt;&lt;P&gt;It looks to me that your understanding of the problem is correct!&lt;/P&gt;&lt;P&gt;I'm currently looking at the following article and hoping that it might help: http://www.wipfli.com/BlogPost_QTBlog_05_06_10.aspx&lt;/P&gt;&lt;P&gt;Possibly by ranking the orders by type and then using a calculated dimension to only show the top order. Might be a long shot..&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-Ken&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 20:19:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238630#M89458</guid>
      <dc:creator />
      <dc:date>2011-03-04T20:19:56Z</dc:date>
    </item>
    <item>
      <title>Straight Table - Supressing Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238631#M89459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Attached is one solution. It took me less time than I expected. Basically, the chart has to behave as if only &lt;EM&gt;some&lt;/EM&gt; of the rows of data actually exist, specifically those rows with the lowest order type sequence. So I use script to add a flag that identifies those rows. The colunns then take the form of only({&amp;lt;Flag={'Y'}&amp;gt;} Field), keeping only those rows by using set analysis. Here's the script beyond what was in my previous post:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;LEFT JOIN (WorkOrder_Order)&lt;BR /&gt;LOAD ORDERNUMBER,ORDERLINE,ORDERTYPE as TEMPORDERTYPE&lt;BR /&gt;RESIDENT Orders&lt;BR /&gt;;&lt;BR /&gt;LEFT JOIN (WorkOrder_Order)&lt;BR /&gt;LOAD ORDERTYPE as TEMPORDERTYPE,ORDERTYPESEQUENCE as TEMPORDERTYPESEQUENCE&lt;BR /&gt;RESIDENT OrderTypeSequence&lt;BR /&gt;;&lt;BR /&gt;LEFT JOIN (WorkOrder_Order)&lt;BR /&gt;LOAD&lt;BR /&gt; WORKORDERNUMBER&lt;BR /&gt;,SEQUENCENUMBER&lt;BR /&gt;,min(TEMPORDERTYPESEQUENCE) as TEMPORDERTYPESEQUENCE&lt;BR /&gt;,'Y' as MINORDERTYPESEQUENCEFLAG&lt;BR /&gt;RESIDENT WorkOrder_Order&lt;BR /&gt;GROUP BY WORKORDERNUMBER,SEQUENCENUMBER&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;My earlier thought was to do all of that work in the set analysis itself, but it seemed easier to just do it in the script, and it will be faster to execute in the chart as well.&lt;/P&gt;&lt;P&gt;Now if you only need those specific rows EVERYWHERE, then you'd change the last left join into an inner join to get rid of the other rows, and even a simple table box would display the right data, no expressions required.&lt;/P&gt;&lt;P&gt;Oh, drop the temp fields at the end. I forgot to do that, but I'm too lazy to go back.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 20:33:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238631#M89459</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-03-04T20:33:21Z</dc:date>
    </item>
    <item>
      <title>Straight Table - Supressing Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238632#M89460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Worked like a charm, John.&lt;/P&gt;&lt;P&gt;I've decided to leave the data in, in case I need it for other reasons in the future.&lt;/P&gt;&lt;P&gt;I ended up using a calculated dimension to display the ORDERNUMBER if MINORDERTYPESEQUENCEFLAG is 'Y', and then suppressing the row if the value was null. This simplified the expressions.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;-Ken&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 23:51:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238632#M89460</guid>
      <dc:creator />
      <dc:date>2011-03-04T23:51:37Z</dc:date>
    </item>
    <item>
      <title>Straight Table - Supressing Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238633#M89461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, a calculated dimension tends to be easier than applying the same condition to multiple expressions. In my experience it has also generally been slower to run. But as long as you have no performance problems, the calculated dimension is probably the right way to go. Glad it worked for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Mar 2011 00:00:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Supressing-Rows/m-p/238633#M89461</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-03-05T00:00:08Z</dc:date>
    </item>
  </channel>
</rss>

