Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jjordaan
Partner - Specialist
Partner - Specialist

Count number of sold Items in Action price period

Hello QlikViewers,

I have a challenge (for me) that I can not  figure out.

This is my situation.

In my QlikView model I have a Fact table with all my transactions.

As a dimension I have the Item table.

As a dimension to that Item table I have a table with all the price changes for certain items for certain periods.

So I have an Item with a unit price of 100.

This item is several times in the facttable because it is sold multiple times.

In my price change table there is a start date and a End date where the price was not 100 but 75 (because of a action or phase out).

I want to visualize how many times is that item sold between the price change start date and price change end date.

So how many times is that item sold for 100 and how many times is that item sold for 75.

I hope somebody can help me.

Thx in advance.

6 Replies
nagaiank
Specialist III
Specialist III

IntervalMatch will help.

jjordaan
Partner - Specialist
Partner - Specialist
Author

Hi Krishnamoorthy,

Thanks for your reply.

I tried to use IntervalMatch but I could not figure out the wright way.

I created a small qvw which looks the same is the original qvw only now with inline table and off course less data.

Maybe you could suggest me how?

Thx in advance again

nagaiank
Specialist III
Specialist III

SormPriceChanges:

LOAD * INLINE

[

    ItemID, StartDate, EndDate, Price, ItemNo_

    110, 01-01-2013, 30-01-2013, 225, 110

    110, 01-03-2013, 15-03-2013, 199, 110

This table is not complete as it does not have the price for the item 110 during the period 31-01-2013 thru 28-02-2013 and there is a transaction on 01-02-2013 as seen below.

Transactions:

LOAD * INLINE

[

    ID, Item, UnitPrice, SoldQty, SalesPrice, SoldDate, ItemNr

    1, 110, 250, 10, 2500, 01-02-2013, 110

    2, 110, 250, 20, 5000, 10-03-2013, 110

    3, 110, 250, 25, 6250, 15-03-2013, 110

jjordaan
Partner - Specialist
Partner - Specialist
Author

Hi Krishnamoorthy,

Thanks again for your reply.

When there is now period that means that the item is sold for the regular year price.

And I don't know how to solve this!

Thank you so much

jjordaan
Partner - Specialist
Partner - Specialist
Author

Hello everyone,

I hope someone can help me with this issue.

Thanks

jjordaan
Partner - Specialist
Partner - Specialist
Author

Can anyone help me with this issue?

Thanks in advance