Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
surajap123
Creator III
Creator III

rounding

Hi Experts,

I have this excel rounding expression. I want to use the same logic in qlikview.

If(Round(B10,4)> (Round(A10,4)-Round(A10,4)*0.005)),'N')


The column B has Feb sales and column A has Jan sales in excel.

Please help!

12 Replies
effinty2112
Master
Master

Hi Suraj,

First a little simplification

If(Round(B10,4)> (Round(A10,4)-Round(A10,4)*0.005)),'N')

=

If(Round(B10,4)> 0.995*(Round(A10,4))),'N')

If B10 = [Feb Sales] and A10 = [Jan Sales] then

If(Round([Feb Sales],0.0001) > Round(0.995*[Jan Sales],0.0001),'N')

It's a bit odd to compare two rounded figures, are you sure we can't just use

If([Feb Sales] > 0.995*[Jan Sales],'N') ?

Suggest it's best to use an aggregation function so

If(sum([Feb Sales]) > 0.995*sum([Jan Sales]),'N')

Good luck

Andrew

surajap123
Creator III
Creator III
Author

‌I am smoothing by half percenta ie. 0.5/100 = 0.005.

MSy i know what is 0.995 in your expression.

dinuwanbr
Creator III
Creator III

Hi,

You can you the same instead of B10(Cell Value in excel) give the QlikView Field Name.

For A10 also the same.

If(Round(B10,4)> (Round(A10,4)-Round(A10,4)*0.005)),'N')


Rgds,

Tharindu