Formula for % of Day Driven Within Shift
- 05-12-2025
This is a classic case for a measured value which is a formula syntax in Sisense that allows you to filter a specific value or calculation. You can then create more complex form,ulas based off of multiple measured values and this way to basically create a % calculation where the numerator is filterewd differently than the denumerator.
In your case you will need to create a formula which filters the numerator to "During Shift" and the denumerator to ALL shift_alignment types or values.
(SUM(trip_duration_minutes),([shift_alignment])/(SUM(trip_duration_minutes),all([shift_alignment]))
Then you can use this formula in any widget, and group it by driver, location, time or any other dimension you like.
Note that the numerator [shift_alignment] section will need to be filtered to 'During Shift' this is explained in the documentation.
See this article for more specific explanations and I think exactly fits your use case (I actually wrote this article a while back when I used to work at Sisense 😅)
If you're looking to group it or create yet another nested query within this logic, you may need to use a multi-pass aggregation
If I can clarify this in any way please let me know, do not hesitate to reach out
We're always here to help 😀
Ido from QBeeQ
QBeeQ - Gold Sisense Partner
Feel free to subscribe to our newsletter to stay up to date with the latest QBeeQ news
- 05-12-2025
danielrabinovit happy to hear it helped you!
You can create a top X ranking filter within the measured value by applying the top filter and then setting the top X value and by what KPI you want to apply it, see screenshot below: