- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Expression not rounding off correctly
Hi,
Hi Experts,
I have an expression named MTD score which is not rounding off correctly
It should round off to 17 but for some other reason it does not work.
I am attaching the sample qvw.
Also this error was captured on 25th Jan 2016 , so maybe if you want to open the qvw and replicate the issue you might have to change the clock on your system .
Regards,
Nadeem
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you looked at the link shared by Bill above? If you have not, look again -> Rounding Errors
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have a read of this Blog Post by Henric :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue here is that the Column(3)'s output seems like its 92, but its actually 91.6666666 which leads to an MTD Score of 16.50. 16.50 is getting rounded to 16, instead of 17.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Firstly your MTD expression returning 85 not 92 so you are getting 15. Don't use ROund functions in your expressions.
Directly user the Number format on the Number tab.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think that is because he is using Today() function and the issue was found on Jan 25th (3 days ago). I have attached the app with Today()-3. You can check it out there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi Sunny ,
Now what should i do if i want the MTD score to be calculated on the rounded off MTD percentage column .
Regards,
Nadeem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this:
=if((((18/100)*Column(3))*100)>18,18,Round((((18/100)*Round(Column(3), 0.01))*100)))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
In your MTD Score Expression,
=if((((18/100)*Column(3))*100)>18,18,(((18/100)*Column(3))*100))
now for that particular loaded field is , 15.23
Hope this Helps,
PFA,
Hirish
“Aspire to Inspire before we Expire!”
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot sunny,
But i plan to keep the expressions same as i have many of them and i suspect that it may cause further issues .
My question remains so as to why does qlikview not round off 16.50 to 17 .
When i use a text object and enclose 16.50 in the round function it gives me 17 but fails to do this in my chart.
Regards,
Nadeem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you looked at the link shared by Bill above? If you have not, look again -> Rounding Errors
- « Previous Replies
-
- 1
- 2
- Next Replies »