Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calculation-Problem in diagram

Hi all,

I want to calculate a field in a diagram:

(sum(Price1)+sum(price2)) / sum(cost)

It doesn't work right: Do u have any idea how to get multiplication and division first, then addition and subtraction?

THX

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Do you mean this:

=Sum((Price1 + Price2)/Cost)

Although I would do this rather - it will handle nulls properly:

=Sum(RangeSum(Price1, Price2)/Cost)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

2 Replies
Anil_Babu_Samineni

What you provide the expression will work. And it works and starts from Left - Right. Ref image attacched

Order_of_Prec.gif

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
jonathandienst
Partner - Champion III
Partner - Champion III

Do you mean this:

=Sum((Price1 + Price2)/Cost)

Although I would do this rather - it will handle nulls properly:

=Sum(RangeSum(Price1, Price2)/Cost)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein