Using a Formula in a Dataset

Hi, I’m brand new to Xibo, but really impressed with it.
I’m still starting (as I’m sure you can tell) but I would really like help on someting I know will be a really simple thing to do, but after searching the help files, I’m unable to do.

I have 3 columns:

Target
Actual
Difference.

I would like difference to calculate the difference between Target and Actual columns. What would be the forumula I would use to do this? Also, is there any links anyone has to any ‘formula exmaples’ where I could learn more please?

Thank you very much in advance.

Paul

Hi Paul,

The formulas are just standard Mysql syntax. Best place to get more info is from the Mysql reference manual.

So for your example, it should be quite straightforward.

`Actual` - `Target`
Example Result: 12

Another example is a date format function:
DATE_FORMAT(`Date_Column`, ‘%W %M %Y’)
Example Result: Sunday October 2009

You can also use more complex CASE WHEN statements. For example:

CASE
WHEN `Actual` > `Target` THEN 'Actual is more than the Target’
WHEN `Actual` < `Target` THEN 'Actual is less than the Target’
ELSE 'Actual is equal to Target’
END

Hope all that makes sense.

Justin

1 Like

Thats awesome mate thanks for taking the time