Zebwen
June 22, 2017, 10:32am
1
Does anyone know of a way to calculate percentage in the formula of a dataset item?
Dataset is:
1: Target - Number
2: Total Orders - Number
3 % Take-Up - Formula (% Of Total Orders from Target)
So if the target is 100, total orders is 50, the Take-Up column would automatically calculate at 50%.
Is this possible?
Thanks!
Rich
Peter
June 22, 2017, 11:10am
2
Yup.
Columns:
formula in take up
((total)*100)/target
Appearance tab in ticker
[target|190] | [total|191] - [take up|192]%
Result with some example values:
Well actually the formula should probably be:
ROUND(((total)*100)/target, 2)
as it will look better this way
Hope that helps.
Zebwen
June 22, 2017, 12:22pm
3
Thanks! Very nearly there!
Is there any way I can add the % symbol inside the formula? I’m not using a ticker widget, I’m using a dataset one.
I’ve tried using: CONCAT(ROUND(((total)*100)/target, 1)),(’%’)
But it only returns % as the result.
Thanks,
Rich
Peter
June 22, 2017, 12:42pm
4
CONCAT(ROUND(((total)*100)/target, 2), '%')
that should work.
Zebwen
June 22, 2017, 12:43pm
5
Unfortunately that leaves the take-up blank!
Zebwen
June 22, 2017, 12:44pm
6
Alternatively, I’m an idiot and forgot to set the column for take-up to Formula instead of Value That works perfectly! Thanks!
Rich
Peter
June 22, 2017, 12:45pm
7
Ok, you got me worried there for a second
I’m glad that works for you.
Zebwen
June 22, 2017, 12:48pm
8
Only have one more issue The actual column names have spaces (so they show correctly in the dataset headers). If I add a space into the column name, it breaks the whole dataset:
CONCAT(ROUND(((Total Orders)*100)/Target, 2), ‘%’)
If “Total Oders” has a space, the dataset goes haywire until I delete that formula column
Peter
June 22, 2017, 1:14pm
9
Right, you will want to put your column name between ` characters (ie backticks)
so no ’ ’ but `and it will work ie:
CONCAT(ROUND(((`total orders`)*100)/target, 2), '%')
Zebwen
June 23, 2017, 12:55pm
10
Aha! Well, you are just a fantastic person and deserve some form of frosted beverage.
Thanks!
Rich
1 Like
Is it possible to do conditional formatting, say color a column/cell if below 50% or something similar?
newbee
March 8, 2018, 9:55am
12
I am trying to replicate exactly as the same as @Zebwen posted with an attendance take up target for an event:
And don’t get the formula pulling through - any ideas?
Cheers
Dean