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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Cut a Decimal off at a Certain spot without Rounding

I have decimals that are computed in our system and come out to something like this 0.197378 that it cuts down to 0.1973 on reports. When I limit the decimal places in QlikView it becomes 0.1974. I have tried using the num function and cannot seem to get the floor function to work, so I wanted to see if there was another way to cut numbers off at a certain decimal and not round them.

Labels (1)
16 Replies
Anonymous
Not applicable
Author

Sorry, but how do I attached qvw file?

SunilChauhan
Champion II
Champion II

go to reply-> use advance editor -> attached file

Sunil Chauhan
Anonymous
Not applicable
Author

I'm working with GPD expression in chart.

jerem1234
Specialist II
Specialist II

floor((Sum(Gain_lbs_b) /  SUM(Processed_head) / Round((sum(AgeInDays * Processed_head) / SUM(Processed_head)), 1.0)),.0001)

seems to be working for me. Using version 11 SR2. Might be a bug with your version of Qlikview.

SunilChauhan
Champion II
Champion II

in GPD use below expression

floor(num(Sum(Gain_lbs_b) /  SUM(Processed_head) / Round((sum(AgeInDays * Processed_head) / SUM(Processed_head)), 1.0),'#.####'),.0001)

hope this helps

Sunil Chauhan
Anonymous
Not applicable
Author

That worked, I was leaving out the 1 at the end.

Anonymous
Not applicable
Author

That worked, I left out 1 at the end.

Thanks to everyone for your help. You made my weekend.