Hi,
I'm trying to do something pretty simple but have a hard time to get it work.
I've an global variable {custom_price} and want to multiply it with each column value. I've tried every combination which came in my mind but nothing works
Simplified example:
var {custom_price} //Custom global variable which is set on the whole Workpad
filters
| essql
query="SELECT HISTOGRAM(created, INTERVAL 1 MONTH) as mydate, SUM(number_of_items) as items_count FROM \"mytable*\" WHERE error_code=0 GROUP BY HISTOGRAM(created, INTERVAL 1 MONTH) ORDER BY mydate DESC"
| mapColumn name="Total" fn={math "multiply(items_count,{custom_price})" |formatnumber "$0,0.00"} // I want to implement something like this
| mapColumn name="Total2" fn={getCell items_count| math "multiply(value,3)" |formatnumber "$0,0.00"} //this works but i can't use the variable here
| table
| render
I know that something with my notation is wrong but can't figure ouw how to write it correctly. I've tried multiple notations but it always gives me a syntax Error
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.