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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register 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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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