Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
lalitkgehlot89
Creator II
Creator II

Need logic help to calculate the sale vaule.

Hi,

I have two tables one in Txn table where i have itemid, barcode, Saledate, Qty.

In another table I have barcode, fromdate, todate, MRP. in this table barcode is not unique. and i don't have continuous dates against the MRP. table has 1000000+ rows from last 10 years . If i am trying to generate dates in this table taking too much time.

Please help me out to calculate the Sales value.

Sales value=qty*MRP

Thanks,

Lalit Kumar

2 Replies
MK_QSL
MVP
MVP

Check for IntervalMatch function..

Sales:

Load itemid, barcode, Saledate, Qty from....

barcode:

Load barcode, fromdate, todate, MRP from...

Inner Join

IntervalMatch(Saledate, barcode)

Load fromdate, todate, barcode resident barcode;

Left join (Sales)

Load * Resident barcode;

drop table barcode;

drop fields fromdate, todate;

omkarvamsi
Creator
Creator

we can results using Interval match concept.

Please try according to below script; and try to load few rows using DEBUG option and run.

if you didn't got the results.please share the sample data files

thanks

MRP_table:

Load barcode, fromdate, todate, MRP from...

Txn_table:

Load itemid, barcode, Saledate, Qty from....

Intevaltable:

IntervalMatch(Saledate)

left Join(Txn_table)

LOAD fromdate,todate

Resident MRP_table;

left join(Txn_table)

load * Resident MRP_table;

drop table MRP_table;