Jump to content
We've recently updated our Privacy Statement, available here. ×

Dynamic Items (decimal numbers) in a text area HTML


Cristian Tibrea

Recommended Posts

Hello, I would like to create a small text area where I need to put the numbers that will update everyday. I know it works with datetime, but when trying to choose decimal numbers it asks me for an aggregation, which I don't need. Is there a trick to get that done?

This is the Text area where data should populate image.png.18f9fc8f9ac7460085f64eee8932435f.pngand this is the values that should get there: SUM_DEPTH for Interval Drilled ..., and MAX_DEPTH for Hole Depth

image.png.455dab241fb13e84264cb12b69e944dc.pngAny suggestion is valuable. Thank you

Link to comment
Share on other sites

Hello Christian,

Could you please explain what you do in more detail (step by step) and ideally include a sample dxp file that illustrates your issue?

In general though, if you are e.g. inserting a Calculated Value, that single value would be calculated using all rows in your selected data table, and thus need some kind of aggregation to become a single value. For cases when you as the author know that there is no actual value to the aggregation (i.e. you know that there will always only be a single row of data, or the values in each row are the same), you simply pick an aggregation anyway that returns the same value as the unaggregated value  (e.g. the "First" aggregation, which I assume should be a very quick operation)

Best Regards

Fredrik 

Link to comment
Share on other sites

Hello Christian (and Happy Friday!),

There are a number of operations in Spotfire where aggregation is required (and those are not aware of/can't assume that your data will always remain "pre-aggregated" even if that happens to be the case right now). As both Kirsten and I have previously suggested, in cases like that, simply pick an aggregation. If I just want any value, I usually go with First() - in your case, if you could actually end up having multiple values at some point, maybe Sum() would be suitable (it all depends on your use case).

Link to comment
Share on other sites

Hello again!

If you are using Snowflake in-database (and want to continue using that - not importing the data into Spotfire, where all Spotfire functions become available), you are limited to certain functions (as described in the manual: https://docs.tibco.com/pub/sfire-analyst/12.5.0/doc/html/en-US/TIB_sfire-analyst_UsersGuide/index.htm#t=connectors%2Fsnowflake%2Fsnowflake_supported_functions.htm&rhsearch=snowflake&rhhlterm=snowflake&rhsyns=%20)

What is the most suitable function is for you to decide (in case there could ever be multiple values), but Sum or Avg could be good candidates.

Best Regards

Fredrik

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...