Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hi Friends I have a sample dataset like below I want to retrieve those customers whose Promot Sales Value > 0 and Normal sales Value = 0 . How to write query in qliksense??

Hi Friends I have a sample dataset like below I want to retrieve those customers whose Promot SalesValue > 0 and Normal Sales Value = 0 . How to write query in qliksense??

 

CustomerSellTypeSalesValue
XG970201NORMAL0
XE355501PROMOT1453
XE711301NORMAL0
XE355501NORMAL0
XF970201PROMOT0
XE530601NORMAL0
XE653901NORMAL0
XE653901PROMOT108756

Thanks & Regards,

Bibhuti

13 Replies
Not applicable
Author

Friends Anyone have idea?? What will be the query...

Thanks & Regards,

Bibhuti

reddy-s
Master II
Master II

Hi Bibhuti,

I am assuming that you are loading data from a flat file. So make use of this:

This is the data set I have considered as one of the sales value field in your example data is missing:

    

CustomerSellTypeSalesValueNV
XG970201NORMAL0.000
XE355501PROMOT1453.0010
XE711301NORMAL0.000
XE355501NORMAL0.000
XF970201PROMOT0.000
XE530601NORMAL0.000
XE653901NORMAL0.000
XE653901PROMOT108756.000

data:

LOAD

    Customer,

    SellType,

    SalesValue,

    NV

FROM [lib://dd/New Microsoft Office Excel 2007 Workbook (2).xlsx]

(ooxml, embedded labels, table is Sheet1) where SalesValue <> 0 and NV = 0;

This would return only the last row as you specified:

XE653901PROMOT108756.000
reddy-s
Master II
Master II

And if you want to omit even the ones with negative values use this:

data:

LOAD

    Customer,

    SellType,

    SalesValue,

    NV

FROM [lib://dd/New Microsoft Office Excel 2007 Workbook (2).xlsx]

(ooxml, embedded labels, table is Sheet1) where SalesValue > 0 and NV = 0;

Not applicable
Author

Hi Mr Sangram ,

Thanks for your reply.

Actually I have a large set of data already imported into qliksense . I want to run the query to extract those customers where SalesType PROMOT then SalesValue>0 and for those customers if SalesType NORMAL available then dat should be equals to 0 . Those Customers I want extract.

It's a complex query, can it will be possible in qliksense??

Thanks,

Bibhuti

reddy-s
Master II
Master II

Hi Bibhuthi,

What you are looking for is totally possible. If not in one load, you should be able to achieve it using a preceding load for sure. If you need any help regarding the query let me know.

Thanks,

Sangram Reddy.

Not applicable
Author

Thanks Mr Sangram,

I am searching for the query.. Please update the query , I am new to qliksense that's why donot have much idea.

I am trying to know more on qliksense please suggest me some good info..

Thanks ,

Bibhuti

reddy-s
Master II
Master II

Hi Bibhuti,

No problem at all.

I would suggest you to go through these links to understand how reduce the data being loaded during a load statement.

https://community.qlikview.com//thread/74735

Using IN clause in QlikView | Learn QlikView

Load with a where clause | Qlik Community

Preceding Load

Simplify with Preceding Load | Qlikview Cookbook

Hope these help solve your issue!

Best Regards,

Sangram Reddy.

Not applicable
Author

Thanks Mr Sangram for your valuable response. Thanks

reddy-s
Master II
Master II

Always Welcome!