Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

if accNo. is the same and the prod class is the same select first

Hi,

is it possible to do the following in QlikView and if so how please.

If AccNo. is listed more than once,  and if Product type is the same,  don't include bottom row in dashboard results.

Therefore in the following list,  line 2 would not show up in results.

   

Lineno.AccNo.ProductNo.ProductType
150025Blue BallBall
250025Yellow BallBall
350060KyteHandGame
4500700YoyoHandGame

Cheers

1 Solution

Accepted Solutions
Not applicable
Author

Hi Laura,

You can try like this also..

View solution in original post

9 Replies
Anonymous
Not applicable
Author

may be like this at script?

Load

AccNo,

FirstValue(ProductNo.) as ProductNo.,

FirstValue(ProductType) as ProductType,

Resident YourTable

group by

AccNo;

sunny_talwar

Or you can do this as well:

Table:

LOAD LineNo,

          AccNo,

          ProductNo.

          ProductType,

FROM Source;

Right Join (Table)

LOAD ProductType,

          Min(LineNo) as LineNo

Resident Table

Group By ProductType;

Anonymous
Not applicable
Author

thanks but i actually want to do this in an expression within QlikView.  To break it up,  how can i do the following.  First in a seperate column,  i wan to add a query that reads if AccountNo. exists more than once  add 2, else add 0.

sunny_talwar

May be this:

If(Count([AccNo.]) > 1, 2, 0)

with [AccNo.] as your straight table's dimension

Digvijay_Singh

Try like this -

Capture.JPG

Not applicable
Author

Hi Laura

Please try this expression.


Table:

LOAD LineNo,

          AccNo,

          ProductNo.

          ProductType,

if(peek(AccNo)=AccNo,firstvalue(AccNo),AccNo) as AccountNO

FROM Source;

Not applicable
Author

Hi Laura,

You can try like this also..

Anonymous
Not applicable
Author

thank-you. I just want to show a number separately on its own (i.e. in a separate box).  how can I do this please?

Anonymous
Not applicable
Author

thank-you. I just want to show a number separately on its own (i.e. in a separate box).  how can I do this please?

E.g:-