Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculation in a textbox

Hi Community

I want to perform a calculation in a text box.

My data table looks liks this:

CategoryNum of ItemsItem Prices
A5100

B

3200
C250

I would like to get the following results:

textbox1 --->Total Costs A  500

textbox2 ---> Total Costs  B 600

textbox3 ---> Total Costs C 100


How is the syntax for the following pseudocode in QlikView?

= Num of Item * Item Prices where Category is A

= Num of Item * Item Prices where Category is B

= Num of Item * Item Prices where Category is C

3 Replies
oknotsen
Master III
Master III

Why not just make it a chart? A straight table to be exact?

May you live in interesting times!
sunny_talwar

May be like this:

1) Only({<Category = {'A'}>}Num of Item * Item Prices)

2) Only({<Category = {'B'}>}Num of Item * Item Prices)

3) Only({<Category = {'C'}>}Num of Item * Item Prices)

ziadm
Specialist
Specialist

Hi

I am not sure what are you trying to achieve but this is how its done using set analysis

in Each Text box your formula should be

= sum( {< Category = {A}>  } [Num of Items] * [Item Prices])

= sum( {< Category = {B}>  } [Num of Items] * [Item Prices])

= sum( {< Category = {C}>  } [Num of Items] * [Item Prices])