Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue with set expression.

Hi,

The following expression returns 4,777M

=RangeMax(0,(sum({<Year=,DATE = {'$(=vTimeFrame)'}>}AMT)+

sum({<Year=,DATE = {'$(=vTimeFrame)'}>}AMT2)))/1000000

I want to convert my result to 3 sig fig's.

So I defined a variable as :

vLogFn = pick(floor(log10(fabs($1))/3)+1, num($1, '#,##0.'), num($1/1000, '###K'),num($1/1000000, '###M'),num($1/1000000000, '###B'))

And then rewrote my original expression as:

$(vLogFn($(=RangeMax(0,(sum({<Year=,DATE = {'$(=vTimeFrame)'}>}AMT)+

sum({<Year=,DATE = {'$(=vTimeFrame)'}>}AMT2))))))

But the result I got is pretty erroneous.

Ideally, I was expecting something like 4.77B

Any suggestions/ help Qlik Gurus..

Thanks in advance.

Regards,

Roy

2 Replies
Gysbert_Wassenaar

I can't reproduce this. Can you post a small qlikview document that demonstrates this problem?


talk is cheap, supply exceeds demand
Not applicable
Author

I couldn't attach here, so created a new thread and tagged you Gysbert.

Thanks for the help.