(SUM(CASE BuyPoint.Match WHEN 'MATCH' THEN 1 ELSE 0 END)/COUNT(BuyPoint.Match ))*100
However, this was returning 0% as the result. This happens when you have an integer in a calculation. A very easy fix to this is to multiply by 1.0 (don't use 1, as this will not work. Use 1.0). The updated calculation below works and provides a meaningful result.
((1.0*SUM(CASE BuyPoint.Match WHEN 'MATCH' THEN 1 ELSE 0 END))/(1.0*COUNT(BuyPoint.Match )))*100
DMurph,
ReplyDeleteWill you be at the RittmanMead forum next week in the ATL? If so, hope to meet you then! Great blog man. Keep up the good work and many thanks!
Jeremy
Thank you, Jeremy. I won't be at the Rittman Mead forum next week, although I did attend it last year. It was well worth the time. I have a conflict with another conference I'm going to, so I can't make the Rittman Mead one. Otherwise, I would be there.
DeleteDMurph,
ReplyDeleteI had forgotten to subscribe via email to replies on this post, and never saw this until now. Sorry we didn't get a chance to run into each other at the RM Forum (was terrific). I also was at the prior year forum as well -- wish we'd met then! I work over in Norcross, somewhere not too far from "atlantabi" -- wherever that may be in the greater ATL area. :)
Any chance we'll both meet on the left coast at OOW in Oct? I'm giving a presentation on BI Publisher+OBIEE based financial reporting. Oh joy! LOL
Thanks again for the "Act As" post. Worked brilliantly.
If you don't mind, drop me an invite on LinkedIn sometime: http://www.linkedin.com/pub/jeremy-harms/2/659/25a
Later.
Ran into this issue when converting. Seems like Oracle decided to assume/force integer division in the 11g calculation engine. We had to visually inspect every report for forced integer calculations. Very Disappointing.
ReplyDeleteThis works great! Thank you so much! very helpful
ReplyDeleteThanks, DMurph.
ReplyDeleteI had the same problem and your tip worked out just fine.
Perfect. Worked for me.
ReplyDeleteHi Dmurph,
ReplyDeleteThank you very much for this advice. It helped me fix a problem :)
I have over 7 years of experience in BI and ETL tools. In order to enhance my learning and share my knowledge, I would like to connect with you on linked In.
Please send me an invite.
https://www.linkedin.com/in/vipul-panchal-0495a125?trk=nav_responsive_tab_profile
This solved my problem. Awesome find!
ReplyDelete