turnilo
turnilo copied to clipboard
Create custom measures / edit measures
As a business user I want to create and save the measures (post aggregations) I use most often.
For example, I have two measures defined in Turnilo config: clicks and impressions. I want to calculate CTR as clicks/impressions*100
At the moment I have to options:
- Ask a developer to change Turnilo config adding the measure.
- Export to CSV and continue in Excel Both are time consuming and breaking the flow.
Would be great to be able to use formulas based on Druid Post-Aggregations.
Hi @eugenelab - thanks for feature request, this is on our long-term roadmap. See #184 (simple expressions for measures).
I think we should start simple, with basic expressions. Post-Aggregations (plywood, we shouldn't tie ourselves to Druid) could be overwhelming to common users.
Hi @mkuthan, thanks! @adrianmroz totally agree. Basic expressions would cover most common use cases.
Hi, any news on this one?
In 1.15 you can add arithmetic expression to measures and calculate percent of total/parent for every measure.
In this dropdown list of measures we see only the measures described in attributeOverrides section of the cube:
How can we see auto-discovered measures there ?
Aren't missing measures some kind of approximation measures? (quantiles, thet sketches ...). We show all non-approximation measures in this dropdown, because arithmetic operations on approximations would be misleading.
No, there are only longSum and doubleSum
Are those measures visible in left-side panel?
Yes.
I can't spot any issue in the code. I will try to reproduce this on my instance and see what happens. So you have config with empty measures section, few attributeOverrides
and rest of the measures are discovered via inspection?
Sorry for misinformation, I just noticed that attributeOverrides
is empty and all measures that I see in the dropdown list are described in Measures
section. All other measures are discovered via inspection.
So let me get this straight:
- Few measures in
measures
section (let's call them defined measures). Rest of discovered via inspection (let's call them discovered measures). - You see both of defined and discovered measures in left panel
- You see only defined measures in dropdown for Expression series
Exactly.
Sorry, I couldn't replicate your issue. I even see that objects passed to left panel and expression dropdown are the same. Only filtering is here: https://github.com/allegro/turnilo/blob/master/src/client/components/series-menu/arithmetic-series-menu.tsx#L108
Are you sure, your measures do not return true for isApproximate
? https://github.com/allegro/turnilo/blob/master/src/common/models/measure/measure.ts#L184
I don't sure what returns isApproximate
. How can I check this ? Here is a typical ingestion spec:
{
"type": "longSum",
"name": "bad_actions",
"fieldName": "bad_actions",
"expression": null
}