Question

How to use single value tiles for calculation?

  • 13 September 2022
  • 2 replies
  • 20 views

Hi
I have a Title with Moth to date spend, another with Days left of the month, and a 3rd one with avg daily spend. How can I use those values into one tile to calculate a projected spend = Month to date spend + (Days left * Avg Daily spend)?

 


2 replies

Userlevel 6
Badge

You can’t, got to bash it out in one query.

If you can get all 3 elements on the same tile, you could do a table calculation like so:
 

sum(${product.sale_amount})
+(
(sum(${product.sale_amount})/count(${product.sale_amount}))
*
(extract_days(add_days(-1, date(extract_years(add_months(1, now())), extract_months(add_months(1, now())), 1)))-extract_days(now()))
)


then you can hide all the columns except the table calculation and the number would display correctly

Reply