Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

object in the qlikview document has to get refreshed daily once

Hi,

I have four charts in my dashboard in which 2 charts has to be refreshed for every 15 mins as new input source arrives every 15 min but 2 charts has to be reloaded daily once to get the trends for the dimensions daily.

When I checked the Qlik community one way of doing this by writing a macro based on selection of value to attach and detach the charts

Used the below macro in f

Attach/Detach

You could achieve this by macro.

Something like this:

SUB TEST
v_AgentCnt = ActiveDocument.Evaluate("=GetSelectedCount(REGION)")
If v_AgentCnt>0 Then
ActiveDocument.GetSheetObject("CH01").Detach
Else
ActiveDocument.GetSheetObject("CH01").Attach
End If
END SUB

And put it on the field you want (Document/Properties/Triggers/Field Event Triggers) on OnChange event.

But when  I am testing the macro it is throwing an error

Object doesn't support this property or method: 'ActiveDocument.GetSheetObject(...).Detach'

Can you please let me know if there is a simple way to achieve this requirement...

Thanks

@

2 Replies
Anonymous
Not applicable
Author

Seems complicated.

Could you just use set analysis on the expression on the daily chart for date < today?

Something like

Sum({$<Date={"<=$(=Date(Today ()))"}>} QTY2)

Digvijay_Singh

You may think of maintaining a variable with the value as current date assigned through a button, the chart calculation condition will be true only when this variable value will not be equal to current date once it is 12 AM every day. You may need to change variable value once a day through a button or by some means so that calculation condition will be false throughout  the day. Not sure if there is a better way