Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
morenoju
Partner - Specialist
Partner - Specialist

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 (3)
3 Replies
Anil_Babu_Samineni

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?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
morenoju
Partner - Specialist
Partner - Specialist
Author

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?

Anil_Babu_Samineni

@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?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful