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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
timmy
Partner - Contributor III
Partner - Contributor III

Problem with calculated dimension

Hey,

I have a pivot table with a calculated dimension:

This is my formula.

=if(not Dos_Active,Stat_DosStatusId & ' ' & DosStatusOmsNL,null())

the problem that i have is that i have to many records and this formula slows down the loading of the pivot every time i make a new selection

Can anybody help me?

tnx

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Some brief testing of mine recently seemed to indicate that conditions in a calculated dimension ran about ten times more slowly than conditions in the chart. I have no explanation why, it was just what I was seeing for a simple example, and was consistent across versions 8.5 and 9.0 SR2.

Assuming that's part of the problem, you might just use this for your calculated dimension:

Stat_DosStatusId & ' ' & DosStatusOmsNL

And then move the condition to the chart expression(s):

if(not Dos_Active,sum(Something))

And then suppress null expressions. Might help, might not, but probably worth a try. If it does help, I have no explanation for why it would help.

I do think that creating the dimension in the script is a better plan, but I can understand if you need a solution NOW, and can't change the script right now.

View solution in original post

7 Replies
Not applicable

Hi Timmy,

create the dimension in your qlikview script.

Is this an option for you?

Rainer

timmy
Partner - Contributor III
Partner - Contributor III
Author

It's no option for the moment! We can't get the data and we need to improve the perfomance of this pivot...

But tnx for the answer

johnw
Champion III
Champion III

Some brief testing of mine recently seemed to indicate that conditions in a calculated dimension ran about ten times more slowly than conditions in the chart. I have no explanation why, it was just what I was seeing for a simple example, and was consistent across versions 8.5 and 9.0 SR2.

Assuming that's part of the problem, you might just use this for your calculated dimension:

Stat_DosStatusId & ' ' & DosStatusOmsNL

And then move the condition to the chart expression(s):

if(not Dos_Active,sum(Something))

And then suppress null expressions. Might help, might not, but probably worth a try. If it does help, I have no explanation for why it would help.

I do think that creating the dimension in the script is a better plan, but I can understand if you need a solution NOW, and can't change the script right now.

timmy
Partner - Contributor III
Partner - Contributor III
Author

This will help!

Only the surpress null()

tnx allot

blaise
Partner - Specialist
Partner - Specialist

Calculated dimension are one of a few functions in Qv that just doesn't seems to be fully functional / developed / tested / optimized. Always trying to avoid them (mainly because the lack of sort by expression)

Not applicable

Yeah, calculated dimensions are annoying. I wonder when QV will fully implement it and also fix the sorting bug.

Not applicable

You should always be able to to get the calculated dimension sorted in the right order.... If the expression is really complex breakand all else fails concatenate a number or letter so that it is presented in the correct order using text or numeric sort.