Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
sibideepak
Creator II
Creator II

finding difficult in implementing an concept

i have to table two tables following:

target:

prod  q1  q2  q3  q4

A       6     8     5     9

price:

prod   start      end      price

A          1          5          100

A          6          10          200

A          11         20         300

A          21         30         400

expected o/p:

prod      q1     q2          q3        q4

A          700    2000    1500      3500

concept:

1.for q1: 6 products then,1-5=100, 5*100=500 ,then remaining 1 is in range 6-10,1*200=200,

now q1=500+200=700

2.for q2: 8 products then,it continous from q1 ie) 8 will be counted to q1(7-14) then 7-10=4*200=800 ,11-14=4*300=1200

now q2=800+1200=2000

similiar for Q3 & Q4 ..

have to implement dynamically...

help needed ..

Thanks ,

Deepak Sibi

1 Reply
cheburashka
Creator III
Creator III

Hello Deepak,

Could you please reformulate your question and add example files?

From my understanding it seems that you will have to use the intervalmatch function to expand your intervals ( start - end). For more information about intervalmatch: (IntervalMatch and Slowly Changing Dimensions)

,KR Koen