Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello ,
The expression below works fine when the "Amount" field is a positive number looking for the solution for the reverse when it's negative.Tried to negate the sum function but it not working.
sum({<Name = {"=rank(sum(Amount))<=$(Top)"}>} Amount)
where $(Top) is an input box variable
Check enclosed file
What you want when the amount is negative values? May be
sum({<Name = {"=rank(sum(If(Amount<0,-Amount,Amount)))<=$(Top)"}>} Amount)
or
sum({<Name = {"=rank(sum(If(Amount<0,-Amount,Amount)))<=$(Top)"}>} IF(Amount<0,-Amount,Amount))
Those didn't work either.
Sorry! Let me add some more clarity to my question. This amount is always negative in this instance, and so when I input a number in the input box say 5 the expression I required is to calculate the top amount by the Name(dimension).The expression works fine with the sales fieldname which is always a positive.
Thanks.
Provide sample data in excel file along with required output... Thanks
Create a Straight Table
Dimension
Name
Expression
SUM({<Name = {"=Rank(SUM(Amount),4)<=5"}>}Amount)
or
SUM({<Name = {"=Rank(SUM(Amount),4)<=$(vTop)"}>}Amount)
That didnt work either.I have already created already a straight table and used the dimension limits to make it work. I show only the smallest and the value is the variable $(Top) which a dynamic for user input.
Now I want to replicate the this in an expression and display in a Text box.
SUM({<Name = {"=Rank(SUM(Amount),4)<=$(vTop)"}>}Amount)
@Manish Kachia
Quite unfortunate it's not working
What you want to show in List BOX? Total of $(vTOP) ?