Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
davymichiels
New Contributor

Check if for dimension value exists already another expression value

Hi there,

I've tried every option I know so I hope somebody can help me out.

First of all : I need to achieve this by set expression, so calculations in the script are not a good solution.

I've got a chart(table) with Date (dim), Order number (dim), Line number (dim), Article number (dim), some other dimensions and some expressions like quantity, value, etc.

This chart is sorted by date.

Important: This chart is already pre-filtered by adding some show_ if-conditions to multiple dimensions. So the count conditions, if used in expressions, must count in the resulting chart and not in the database set of records.

(I)

Now I want to have an expression column that can check for every Article number if it only exists once or not. If not I want also to  determine what is the first occurence in the table.

I'm thinking of creating a new field that combines Order number and Order line so I have a unique field (let's say "NR_LINE") and I want to combine that with a count for every article number how many "NR_LINE" there are.

If this count comes op with a result of more than "1" then I need to determine if this is the first occurence or nor (maybe something with below() or above() )

(II)

If we get part (I) right I would also like to take it somewhat further and for every article number that comes up the 2nd time or more, it should mention the Order Number of the previous occurence (2nd time Article number shows 1st time Order number, 3rd shows 2nd, and so on)

Best regards,

Davy

 

 

 

4 Replies
Highlighted
davymichiels
New Contributor

Re: Check if for dimension value exists already another expression value

Nobody has any idea?

Highlighted
Digital Support
Digital Support

Re: Check if for dimension value exists already another expression value

Generally it is most helpful if you attach your source data or QVW you have along with what you want to see, otherwise not betting you are going to get a response from anyone.

Regards,
Brett

To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
Highlighted
MVP & Luminary
MVP & Luminary

Re: Check if for dimension value exists already another expression value

Can you post a sample QVW?  I'm a bit thrown by 

"-Important: This chart is already pre-filtered by adding some show_ if-conditions to multiple dimensions. So the count conditions, if used in expressions, must count in the resulting chart and not in the database set of records."

-Rob

Highlighted
davymichiels
New Contributor

Re: Check if for dimension value exists already another expression value

I've attached a sample file to show you what I need to achieve