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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

how to write expression

HI,  i got a sample data like below,

partt        component12       plant_code         vendor_code   volumn     unit_price

A                  01                    xxx                      aaa               10            12

A                  02                    yyy                       bbb              15             12

A                  03                    zzz                       ccc               10             16

B                  -                        jjj                       ddd                  5             6

Untitled.png

i am able to display 35 only in one row ,how to display 35 in remaining two rows as well ,

Expression :aggr(sum(volumn),partt) ....what is wrong with his expression

Thanks

15 Replies
sunny_talwar

Can you post your file... will be easier to work with a sample

kunkumnaveen
Specialist
Specialist
Author

what i tried to get new_column is:

aggr(sum(sum(volumn )* sum(unit_price)),plant_code)-(Aggr(NODISTINCT Sum(volumn),partt) *  sum(unit_price))

but i am getting null

sunny_talwar

Okay

kunkumnaveen
Specialist
Specialist
Author

sample file

sunny_talwar

May be this

sum(TOTAL <partt> volumn * unit_price) - Aggr(NODISTINCT Sum(volumn),partt) *  sum(unit_price)

kunkumnaveen
Specialist
Specialist
Author

perfect ,thanks a lot