Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 07-10-2017, 03:24 PM   #1
dennocoil
Member
dennocoil began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Aug 2016
Device: Samsung S6 Phone
Need help in Custom Columns, template syntax, and rounding numbers

I have no clue if Calibre supports this.

I'm creating a custom column ("built from other columns") that takes the Like and Dislike numbers of two other custom columns in a library to make it into a ratio of 100% for how good said book is.

I have the formula for it that consistently puts out a 0% to 100% ratio.
Code:
Likes / ( Likes + Dislikes ) X 100 = Ratio
But then comes rounding the numbers so Calibre doesn't make hundreds of decimal places or something weird like that. I just need to know what syntax in the template field that I need to put in to make it work and make it round numbers so that it doesn't give decimal places or only has 1 decimal place.

Last edited by dennocoil; 07-10-2017 at 04:26 PM.
dennocoil is offline   Reply With Quote
Reply

Tags
custom columns, math, syntax, templates

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
syntax for removing numbers between lines please leftright Sigil 6 09-08-2016 04:59 AM
Request: template-making assistance for column built from other columns iienderii Library Management 9 04-04-2016 10:27 PM
Syntax for custom lists in programs ivanm Library Management 2 01-04-2015 04:30 PM
Rounding to nearest integer in Custom Column - Hijri Year oelgamal Calibre 2 03-28-2013 07:12 PM
Rounding to nearest integer in Custom Column - Hijri Year oelgamal Recipes 0 03-28-2013 02:58 AM


All times are GMT -4. The time now is 01:44 AM.


MobileRead.com is a privately owned, operated and funded community.