Forum Discussion
AssafHanina
09-16-2024Sisense Employee
hey liamcameron ,
Applying those type of calculations can be challenging in the dashboard level.
normally the Hours Difference is calculation require for each row but the presentation needed is to group the values per different Dimensions.
The suggested approach for those cases is to apply the Calculation directly in the Source Data (Live/Elasticube), which can provide the following main advantages.
- Minimize computation at the dashboard level since multiple users will run this query, while it can be applied once in the source database.
- Support all types of Widgets.
- Allow easy grouping by various dimensions.
In case the 2 columns are taken from the same Table or can be combined into a single table,
For example: Start_time and End_time, than Suggest to add additional column for HoursDiff
calculation.
Implementation Suggested (Assumption of the date columns are in the same table):
- For Live Models - Calculate
HoursDiff
as a new column in the source database. - For Elasticube - Multiple options:
- CalculateHoursDiff
as a new column in the source database.
- perform theHoursDiff
calculation throguht Import Query
- PerformHoursDiff
as with custom Column - in case needed to combine multiple tables into one:
- use custom table
- add to the select statement theHoursDiff
calculation
Please find related Documentation
Best Regards