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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro Query

Hi Team,

On other tabs of the QV appliation, I have to show data for only one date. For this I used "Always Selected One" as true in listbox.

But on Trends tab I have to show the data for all the dates...it means when I move to Trends tab, I have to clear all the selection. To achieve this, I am using below macro "On Activate" of Trends Tab...

****************************************************************
Set fld = ActiveDocument.GetField("History_Date")

Set prop = fld.GetProperties
prop.ShowAlternatives = False
prop.OneAndOnlyOne = False
fld.SetProperties prop

ActiveDocument.ClearAll True

Set prop = Nothing
Set fld = Nothing
****************************************************************

But its not working. And on Trends tab also, I am getting the graph for one date only.

This happens when I view the dashboard thru Web - ie thru Internet Explorer. Its working fine if I see it on my standalone system.

Please suggest any solution or workaround for this!!

2 Replies
Not applicable
Author

You could use another field.

In the script you can load a History_Date and, reading the same values, History_Date_Referred

History_Date_Referred hasn't got any join with tables.
Use "Select Only" functionality with that field..

If you want to get a Value of a date you can use:

sum({$<History_Date={$(=History_Date_Referred)}>} Value)

If you want a trend you can use a calculate dimension like month(History_Date)

Not applicable
Author

Thanks for the reply.

You mean to say i have to create one variable History_Date_Referred and populate it on the change of History_Date field.

In that case also, if i clear History_Date field, it will throw an error while i am setting the selected value in to variable thru macro.

Moreover, we r working on QV Server where Set Analysis will not work ie we are using QV Server version before 8.50