Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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.