Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Partner
Partner

Improving performance of expression

Hi all,

In my Qlik Sense app I have codes with start and close timestamps, and a calendar dimension (link_date_time_15min) that consist of timestmaps with 15 minute intervals.

On a table I'm using a master dimension defined as:

=if('$(=close_timestamp)'>=link_date_time_15min AND '$(=start_timestamp)'<=link_date_time_15min, timestamp(link_date_time_15min,'hh:mm'))

When I pick a code, I'm seeing on the table the list of link_date_time_15min between close and start timestamp, which is what I was looking for, but while calculating the result the CPU and memory go to 100% and sometimes my app becomes unresponsive.

Do you know of any other method to achieve the same results but with better performance?

Thanks!

Juan

Labels (4)
3 Replies

Re: Improving performance of expression

How is the variables loos like? If those are simple fields, I recommend to create that in script as field and use that as field.

If those are variables not able to bring to script. Can you let us know how variables are defined?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Partner
Partner

Re: Improving performance of expression

The value of the dimension depends on user selection on a field called code.

Each code has a start and close timestamp.

The dimension is: 

=if('$(=close_timestamp)'>=link_date_time_15min AND '$(=start_timestamp)'<=link_date_time_15min, timestamp(link_date_time_15min,'hh:mm'))

We don't know the values of start_timestamp and close_timestamp until the user has selected a code.

I guess it takes so much time to calculate the value of the dimension because it checks every single possible link_date_time_15min to see if they meet the conditions in the if. What do you think?

Re: Improving performance of expression

@morenoju 

When we use $() anywhere in the statement we can think there is variable definition. If you can bring them That would easy to track where efficiency failed?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)