Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
robert2012
Contributor III
Contributor III

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
Partner

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

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
Partner

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