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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

error in calculated dimension

Why do I get error in calculated dimension with this:

=if (Count(distinct NetworkSessionId) > 20, 2, if (Count(distinct NetworkSessionId) > 10, 1, 0 ) )

3 Replies
pover
Partner - Master
Partner - Master

You can't put any formula in a calculated dimension. The calculated dimension should be an expression that uses the aggr() function or an if() that evaluates a list of values in a field. The formula needs to return a list of values and not a simple count() or sum() that depends on some type of grouping.

Why don't you put this formula as a expression? What of chart or table do you want to create?

Regards.

Not applicable
Author

The code what you are using is not a Measure / expression ......

If you are using it in Dimesion , its ok but there is no Dimesion filed to be Populated.

for example i have dimesion Employee Name and employee Number. then we use

if( employee_Num > 20 , Employee_name)

its should have some dimension to show in that coloumn.

I hope this will work.

Not applicable
Author

PLease provide you feed back tat its woring or not !!!!!!