Open AntonyKlipperAS opened 1 month ago
Hi @AntonyKlipperAS 👋
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
For count
measures, you don't need to specify the sql
parameter.
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.
Did it help?
Hi @igorlukanin
Leaving the sql parameter did indeed help and it works as expected.
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: