Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Please see below. Actually I want to sort on First Column(Net Sales Bands).
I am using expression.
replace(replace(CLASS(Aggr(sum({<DECDDT1 = {">=$(vFromDate)<=$(vToDate)"}>}[Net Sales]),accpg_accno),1000,'-'),'<=',''),'<','')
its does not sort properly if I double click on column heading. is there any way to sort as numbers.
Thanks
Vinay
DUAL(replace(replace(CLASS(Aggr(sum({<DECDDT1 = {">=$(vFromDate)<=$(vToDate)"}>}[Net Sales]),accpg_accno),1000,'-'),'<=',''),'<',''), CLASS(Aggr(sum({<DECDDT1 = {">=$(vFromDate)<=$(vToDate)"}>}[Net Sales]),accpg_accno),1000,'-'))
Now go to sort tab...
Select Number Value by Asc or desc
DUAL(replace(replace(CLASS(Aggr(sum({<DECDDT1 = {">=$(vFromDate)<=$(vToDate)"}>}[Net Sales]),accpg_accno),1000,'-'),'<=',''),'<',''), CLASS(Aggr(sum({<DECDDT1 = {">=$(vFromDate)<=$(vToDate)"}>}[Net Sales]),accpg_accno),1000,'-'))
Now go to sort tab...
Select Number Value by Asc or desc
By using the replaces, you're changing the result of the class, which should be a dual, to a text string. Simply getting rid of the replaces should solve this problem and allow it to sort as a number (you can use this as a Sort by Expression on the Sort tab):
CLASS(Aggr(sum({<DECDDT1 = {">=$(vFromDate)<=$(vToDate)"}>}[Net Sales]),accpg_accno),1000,'-')
Thanks Manish & Nicola,
Its working perfect.
Regards
Vinay