Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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??
Customer | SellType | SalesValue |
XG970201 | NORMAL | 0 |
XE355501 | PROMOT | 1453 |
XE711301 | NORMAL | 0 |
XE355501 | NORMAL | 0 |
XF970201 | PROMOT | 0 |
XE530601 | NORMAL | 0 |
XE653901 | NORMAL | 0 |
XE653901 | PROMOT | 108756 |
Thanks & Regards,
Bibhuti
Friends Anyone have idea?? What will be the query...
Thanks & Regards,
Bibhuti
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:
Customer | SellType | SalesValue | NV |
XG970201 | NORMAL | 0.00 | 0 |
XE355501 | PROMOT | 1453.00 | 10 |
XE711301 | NORMAL | 0.00 | 0 |
XE355501 | NORMAL | 0.00 | 0 |
XF970201 | PROMOT | 0.00 | 0 |
XE530601 | NORMAL | 0.00 | 0 |
XE653901 | NORMAL | 0.00 | 0 |
XE653901 | PROMOT | 108756.00 | 0 |
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:
XE653901 | PROMOT | 108756.00 | 0 |
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;
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
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.
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
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
Simplify with Preceding Load | Qlikview Cookbook
Hope these help solve your issue!
Best Regards,
Sangram Reddy.
Thanks Mr Sangram for your valuable response. Thanks
Always Welcome!