Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Relationship between tables

Hi all.

I'm trying to solve this problem.

How do I cross the tables below to calculate:

Full potential of 2015

(Answer should be 800)

or Full potential by product

   (Answer should be A = 3700 ; B = 300)

Tks a lot!!

Sales per Year

CityCódYear of ProductionQtd
São Paulo120155
Rio de Janeiro120143
São Paulo220147
Rio de Janeiro3201310
Rio de Janeiro620155

Models

CódProduct
1A
2A
3A
4A
5B
6B
7B

Potential of maintenance

ProductYearPotential
A2015100
A2014150
A2013170
B201560
4 Replies
Not applicable

Re: Relationship between tables

Hi,

Try this (it's not very elegant but it should work) :

Full potential of 2015:

=sum({<[Year of Production]={"2015"}>*<[Year]={"2015"}>} Potential*Qtd)

Full potential by product:

=sum(if([Year of Production]=Year,Qtd*Potential))


Xavier.

mov
Esteemed Contributor III

Re: Relationship between tables

See attached

MVP
MVP

Re: Relationship between tables

Yet another solution   - and I attached the QVW too:

2015-05-11 #4.PNG

2015-05-11 #5.PNG

Re: Relationship between tables

Hi,

one solution could be also:

QlikCommunity_Thread_163545_Pic1.JPG

QlikCommunity_Thread_163545_Pic2.JPG

hope this helps

regards

Marco

Community Browser