Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

michaelk
Contributor

Select last version of dublicate orders

Hi,

I have a data source, having the following structure:

Excel.jpg

When an order is created, it gets a 0 as the version number. When it is finished, it gets the 1 as the version number and a ending date is added. So, for all finished order the relevant version is the 1 and for all pending orders, the relevant version is 0. Any idea how to load only the latest version of any order. For the example from above meaning version 1 for the orders A, B and C and version 0 for order D.

Any ideas?

3 Replies

Select last version of dublicate orders

Hi,

   Create a chart with dimension as order, DateStarting and DateEnding.

   Add expression as Max(Version)

Regards,

Kaushik Solanki

michaelk
Contributor

Select last version of dublicate orders

Hi Kaushik, thanks for the quick response. I'm not so experienced, so what do you mean by "add expression". Where do I have to add this expression. Am I understanding right, that I allways have to read the complete table and make the selection afterwards. Isn´t it possible to use the SQL expression HAVING Max(Version). I've read in the manual, that this expression is existing, but I didn't accomplish to get it running it. Regards Michael

Select last version of dublicate orders

Hi,

   Here are the steps.

   Right click on the sheet.

   Click on the New sheet object

   Here click on the chart.

   Here in wizard you will find may charts, click on straight table.

   Now click Next

   Here add dimension as Order, DateStarting, DateEnding.

  Click next.

   Here click on add

  Type Max(Version)

  Click on finish.

  Make sure that you type word "Version" in same case as qlikview is case sensitive.

Regards,

Kaushik Solanki