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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
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!

1 Solution

Accepted Solutions
its_anandrjs
Champion III
Champion III

Try this

=If( Round(FieldB,4) > ( Round(FieldA,4) - ( Round(FieldA,4) * 0.005 ) ),'N')


This is in correct


If(Round(B10,0.0001)> (Round(A10,0.0001)-Round(A10,0.0001)*0.005)),'N') //Is this correct??

View solution in original post

12 Replies
ravikumar_iyana
Creator
Creator

Hi,

Up to my knowledge plz don't take round in sales field

After data load , in writing expression time show total option is there write

There based on your requirement Ceil() , Floor(),

Like this apply

its_anandrjs
Champion III
Champion III

Can you share some sample data here to have a look.

Anil_Babu_Samineni

This is straight forward

If(Round(FieldnameofB10,4) > (Round(FieldnameofA10,4)-Round(FieldnameofA10,4)*0.005),'N')


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
its_anandrjs
Champion III
Champion III

Follow the bodmos rule in formula and try this replace your fields there

=If( Round(FieldB,4) > ( Round(FieldA,4) - ( Round(FieldA,4) * 0.005 ) ),'N')

avinashelite

how you have imported the data to Qlikview I mean Feb and Jan sales are in different columns or in the same columns ? based on this the expression needs to be tweaked

surajap123
Creator III
Creator III
Author

Thanks All!

This both jan and feb data is in single column in qlikview which is sales percentage.

In front end, I want to compare both month sales in chart by rounding it to 4 decimals and then smoothing it to 0.005(smoothing purpose is- if difference between both percentage is less than half percent then consider both as same). This is my understanding.

Below is the excel formula. Please help how can i write in qlikview.

excel->

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

qlikview expression-

If(Round(B10,0.0001)> (Round(A10,0.0001)-Round(A10,0.0001)*0.005)),'N') //Is this correct??

its_anandrjs
Champion III
Champion III

In B10 and A10 what is the value for i believe it is for the sales if so please explain with example.

surajap123
Creator III
Creator III
Author

sum({<Month = {'Jan'}>}field1)/sum({<Month = {'Jan'}>}field2)  //A10

sum({<Month = {'Feb'}>}field1)/sum({<Month = {'Feb'}>}field2) //B10

its_anandrjs
Champion III
Champion III

Try this

=If( Round(FieldB,4) > ( Round(FieldA,4) - ( Round(FieldA,4) * 0.005 ) ),'N')


This is in correct


If(Round(B10,0.0001)> (Round(A10,0.0001)-Round(A10,0.0001)*0.005)),'N') //Is this correct??