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

Straight Table Calc Dimension Click Event

Hello -

I implemented a straight table that displays a scorecard of various metrics using a calculated dimension (valuelist()). The result looks like:

Metric

Current Month

Change From Prior Month

Image

Some Rate

10%

+ 1%

Up Arrow

Another Rate

85%

-3.5 %

Down Arrow



I want to call a macro if the user clicks on one of the rows in the table. This macro will then dynamically change the expression in a line chart that shows the selected metric over a period of time.

I'm guessing it's pretty easy to change an expression in the line chart on the fly using a macro; however, I first need to access the onclick event for the table? Can someone point me in the right direction?

Thanks in advance,

Peter



1 Reply
Not applicable
Author

Ok, the best I could do:

1. Instead of using valuelist in the calculated dimension, I loaded an in-line table to hold the same values.I then used the field from this table as my dimension.

2. Under document settings, I added an "Action" for the OnSelect() event for the newly created field

3. I wrote a macro to:

a. Remove the expression from the line chart

b. Based on the selection in my table, add a new expression

c. Clear the selected values in the table (otherwise my table is filtered like a listbox, which I don't want)

Not sure if this is the best solution, but it works. Does anyone know if I'll run into any issues when publishing this document in the AJAX format?