
Re: Summing negative Values in Buckets using Aggr(If(Sum))
Stefan Wühl May 28, 2017 12:04 PM (in response to Phalgun P)I assume you are using this as calculated dimension in a bar char, right?
What is the expression you are using (should be an aggregation function)?
=Count(DISTINCT [PO#])
?
Could you post a small sample QVW that demonstrates your issue?

Re: Summing negative Values in Buckets using Aggr(If(Sum))
Phalgun P May 29, 2017 2:32 AM (in response to Stefan Wühl )Hello! Thanks for the reply. Yes, I'm using it as a calculated dimension for the Bar chart. The expression I'm using is Sum([Value in USD]) as I want to display the Dollar Value split within these buckets. PFA the excel file and the qvf.

Sample.qvf 352.0 K

Sample.xlsx 448.5 K



Re: Summing negative Values in Buckets using Aggr(If(Sum))
Sunny Talwar May 28, 2017 1:46 PM (in response to Phalgun P)I don't see anything wrong with your calculated dimension.... (except may be if you have a full stop at the end?)
Aggr(If(Sum([Value in USD]) < 0, Dual('<0',1),
If(Sum([Value in USD]) < 500, Dual('0500',2),
If(Sum([Value in USD]) < 2500, Dual('5002.5k',3),
If(Sum([Value in USD]) < 5000, Dual('2.5k5k',4),
If(Sum([Value in USD]) < 20000, Dual('5k20k',5),
If(Sum([Value in USD]) < 50000, Dual('20k50k',6),
If(Sum([Value in USD]) < 250000, Dual('50k250k',7),
If(Sum([Value in USD]) < 500000, Dual('250k500k',8),
If(Sum([Value in USD]) < 1000000, Dual('500k1Mn',9)
Dual('>1Mn',10)))))))))), [PO#]).
If that is just for the post and you don't have it otherwise, then I would check the casing of your field names.... if those are also not the issue, then a sample or screenshots might be helpful in seeing the issue

Re: Summing negative Values in Buckets using Aggr(If(Sum))
Phalgun P May 29, 2017 2:33 AM (in response to Sunny Talwar )Hello.PFA the excel file and qvf in the reply above. Thanks!

Re: Summing negative Values in Buckets using Aggr(If(Sum))
Stefan Wühl May 29, 2017 4:49 AM (in response to Phalgun P)There is a comma missing before the last Dual() function, which the syntax checker has not catched
Aggr(If(Sum([Value in USD]) < 0, Dual('Less than 0',1),
If(Sum([Value in USD]) < 500, Dual('0500',2),
If(Sum([Value in USD]) < 2500, Dual('5002.5k',3),
If(Sum([Value in USD]) < 5000, Dual('2.5k5k',4),
If(Sum([Value in USD]) < 20000, Dual('5k20k',5),
If(Sum([Value in USD]) < 50000, Dual('20k50k',6),
If(Sum([Value in USD]) < 250000, Dual('50k250k',7),
If(Sum([Value in USD]) < 500000, Dual('250k500k',8),
If(Sum([Value in USD]) < 1000000, Dual('500k1Mn',9) , //missing comma
Dual('>1Mn',10)))))))))), [PO#])

Sample (2).qvf 352.0 K

Re: Summing negative Values in Buckets using Aggr(If(Sum))
Phalgun P May 29, 2017 5:16 AM (in response to Stefan Wühl )My bad! Sorry for the foolish question then. Should have caught this easily.


