You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm having a problem with a measure that us working fine in the playground but not when used in a view.
** Count measure referencing another cube**
The measure reference another cube and is defined like this:
I tried different things (to rewrite to ${CUBE.id_order or 'ID_ORDER'}` , the only thing that worked for me was to leave the sql property out of it, like this:
So it seems like a pretty easy measure? I want to do a count on my order where a status = 'paid-and-picked'.
but it's creating this weird sql in the view where it's also referencing an alias table outside of it's own creation. I mean by this for example ‘select AliasTable.* from (select * from table_x as AliasTable)." which is not possible.
I tried different things (to rewrite to ${CUBE.id_order or 'ID_ORDER'}` , the only thing that worked for me was to leave the sql property out of it, like this
Regarding the rest of your question: in Slack, where you originally asked about this, I have suggested to bring the dimension that you're filtering your measure on into the measure's cube as a subquery dimension and point the filter to it. Is might work as a workaround.
Hi,
I'm having a problem with a measure that us working fine in the playground but not when used in a view.
** Count measure referencing another cube**
The measure reference another cube and is defined like this:
I tried different things (to rewrite to ${CUBE.id_order or 'ID_ORDER'}` , the only thing that worked for me was to leave the sql property out of it, like this:
But I want to clearly understand what is happening wrong when using the sql property because I have other issues with different measures as well.
My datamodel:
So it seems like a pretty easy measure? I want to do a count on my order where a status = 'paid-and-picked'.
but it's creating this weird sql in the view where it's also referencing an alias table outside of it's own creation. I mean by this for example ‘select AliasTable.* from (select * from table_x as AliasTable)." which is not possible.
generated sql:
The text was updated successfully, but these errors were encountered: