Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can you get an Expression to work as a Calculated Dimension?

Hi everyone - I currently have a straight table and have an expression that I would like to use as a calculated dimension - but whenever I move the expression to be a calculated dimension, it returns //Error in calculated dimension - this is driving me nuts, as it seems logical to me, but don't understand why, when it works as an expression, it doesn't work as a calc.dimension....

The set analysis I am using in the expression (that works) is ONLY({$<Type = {'Hire Reject'}>}User) - this returns the user I would expect to see, yet when I put this into a calc dimension it returns the error.....please can anyone help me???

Cheers

Si

5 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

Aggr(If(Type = 'Hire Reject', User), User, Type)


or


just use Type = 'Hire Reject' in all you expressions in chart, calculated dimension has performance issues.


Regards,

Jagan.

Not applicable
Author

Hi Jagan - thanks for the input....

For some reason - if the expression is switched on, your suggestion returns the result I am looking for, yet as soon as I turn off the expression (and have the dimension still valid), it loses the result and returns a '-' in the result....frustrating!

Would you suggest not using calculated dimensions and do something in the load script as an alternative?

Cheers

Simon

jagan
Partner - Champion III
Partner - Champion III

Hi,

Can you attach some sample file?

Regards,

Jagan.

Not applicable
Author

Try this in Calc Dimension Expression

Aggr(ONLY({$<Type = {'Hire Reject'}>}User),User)

Regards,
Prabhu

Not applicable
Author

Hi everyone - thanks for your input - I have decided to build it into my load script and not use calc dimensions.

Thanks

Simon