Skip to main content
Announcements
Global Transformation Awards submissions are open! SUBMIT YOUR STORY
cancel
Showing results for 
Search instead for 
Did you mean: 
thanhphongle
Creator II
Creator II

sum up selling price greater than a lower limit of cost in a bar chart

Hello Community,

I want to sum up my selling prices which is greater than 5000, but it should consider all referencenumber. that means for example:

Reference numberSelling price
14000
15100
15900
22100
23000
24000
35600
38400
34000

I tried this. I created a bar chart and pick Referencenumber as dimension. My expression is

if([Selling price]>5000, sum([Selling price]))

QV should return me

Reference Number 1 -> sum(selling price) = 11000

Referennce Numer 2 -> sum(selling price) = 14000

If i use my database, it works for certain referencnumbers. but qv does not show the sum(Selling price) where Selling price >5000 for every referencenumber. can anyone help me out here? I attached my qv file.

1 Solution

Accepted Solutions
sunny_talwar

Try this:

Sum({<[Selling price] = {'>5000'}>}[Selling price])

View solution in original post

4 Replies
sunny_talwar

Try this:

Sum({<[Selling price] = {'>5000'}>}[Selling price])

sunny_talwar

For your sample everything is greater than 5000.

Capture.PNG

but if we do greater than 10,000, you will see the difference

Capture.PNG

thanhphongle
Creator II
Creator II
Author

Hahaha, you are the best !!!!! It works, thank you very much !!!

sunny_talwar

No problem at all. Just so you know, the if equivalent of the set analysis I used looks like this:

Sum(If([Selling price]>5000, [Selling price]))