Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression count in macro

I'm writing a macro to toggle showing or hiding values on data points. It works for a chart with a single expression using

Expressions.Item(0), but I'd like to use it for charts with multiple expressions. In my macro, how can I get a count of how many expressions are in my chart so I can cycle through them with a FOR clause?

4 Replies
zhadrakas
Specialist II
Specialist II

Hello Len,

set chart = ActiveDocument.GetSheetObject("CH21")
set cp = chart.GetProperties
n = cp.Expressions.Count

Anil_Babu_Samineni

Macros Are not Good Tim.

Len, Yes we can show. Please find attachment for Ref. Hope this helps

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
Not applicable
Author

Thanks, that worked. The Expressions.count was what I needed.

zhadrakas
Specialist II
Specialist II

good to know. please dont Forget to mark this as answered.