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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

error in calculated dimension

Hi,

I need a calculated dimension that goes like this:

=if(count(Aggr(max({<LS_STATUS={'VL'}>}doorlooptijd2),SLEUTEL))=0,"SLEUTEL")


But I'm getting an "Error in calculated dimension".

I also tried

=if(count({<LS_STATUS={'VL'}>}Aggr(max({<LS_STATUS={'VL'}>}doorlooptijd2),SLEUTEL))=0,"SLEUTEL")


But that also doesn't work...

Anyone knows what the problem is?

Thanks in advance.

1 Solution

Accepted Solutions
Not applicable
Author

I've found a way to make it work.

In my script I've created a new field (STATUS_VL) for every record, that evaluates if the status = VL, then the field gets the value 1, else it gets the value 0.

Then I changed my calculate dimension to

=if(Aggr(sum(STATUS_VL),SLEUTEL)=0,SLEUTEL)


and it works! 🙂

View solution in original post

4 Replies
Anonymous
Not applicable
Author

In these cases it is often the aggr combined with other functions which gives the 'error in calculated dimension' ...

don't have the solution here for you ... but try to build the thing up step-by step to see what is giving the error.

Not applicable
Author

Maybe a bit more info on what i'm trying to do.

I have records with TurnAroundTimes.

SLEUTEL = KEY

PLANUITVOERING = START

LS_INSERTDATE = END

doorlooptijd2 = TAT

LS_STATUS = every time the status changes, there is a new TAT added

So now i need to show a table of only the records with SLEUTEL that don't have a value 'LV' in the status field.

Like the one on the image in the red square (SLEUTEL = 2452029), this ons has 4 records, but none of these records have a status 'VL'.

Not applicable
Author

Hi,

If you remove the count and go with Aggr, it will work. Not sure about you will get desired output.
=if(count(Aggr(max({<LS_STATUS={'VL'}>}doorlooptijd2),SLEUTEL))=0,"SLEUTEL")

					
				
			
			
				
			
			
			
			
			
			
			
		
Not applicable
Author

I've found a way to make it work.

In my script I've created a new field (STATUS_VL) for every record, that evaluates if the status = VL, then the field gets the value 1, else it gets the value 0.

Then I changed my calculate dimension to

=if(Aggr(sum(STATUS_VL),SLEUTEL)=0,SLEUTEL)


and it works! 🙂