Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sarfaraz_sheikh
Contributor III
Contributor III

Query regards the dimension level

Dear All,

I have the below data:----

Product   Premium

A             100

B              35

C              50

D              60

E              55

I want to print like below :-

Product   Premium

A             100

B              35

A-B           65

C              50

D              60

E              55

Is this possible in qlikview ...if yes then how can do this ....

Sarfaraz

6 Replies
sarfaraz_sheikh
Contributor III
Contributor III
Author

kindly reply ....Its urgent ..........I tried but unable to achive the same ......

Sarfaraz

richard_chilvers
Specialist
Specialist

Hi Sarfaraz

I think you might need to give a bit more detail about what you're trying to achieve.

For example, why do you subtract B from A only ? Are there other subtractions?

sarfaraz_sheikh
Contributor III
Contributor III
Author

Hi rechard,

There is requirement from business user to print like this .....I have products list however among product i want particular product volume to get substracted from another particular product volume ...

Is there any way to achive this ...If yes then kindly let me know how i can do this

Sarfaraz

richard_chilvers
Specialist
Specialist

Hi Sarfaraz

How do you know which products to subtract from each other?

You will need to build these rules into your model so QlikView can do the calculations.

You might want to look at Chart Inter Record functions in the help.

sarfaraz_sheikh
Contributor III
Contributor III
Author

Dear Richard,

I  know which one shoud get  substract with which one.

How i can build these rule in qlikview model .......Can you keep any example here for my understanding

Sarfaraz

richard_chilvers
Specialist
Specialist

Hi

You might like to load this little script to see how it might work.

Of course, your data would need to come from the data source/database you are using.

It is not an elegant solution I'm afraid. But you could improve on it, depending on what your requirements are.

Good luck.

Products:

LOAD * INLINE [

Product, Premium
A , 100
B, 55
C, 50
D, 60
E, 55


]
;

LOAD 'A-B' AS Product, LOOKUP('Premium','Product','A','Products')-Premium AS Premium
RESIDENT Products WHERE Product = 'B';
EXIT SCRIPT;