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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reference on x axis / dimension on chart expression?

Hi all,

I'm a little puzzled how I could refer to the value of dimension in a chart expression. I should get a number of Products with the same value in another table. In QlikView pseudocode the expression would be something like this:

count( {$< Q2 = [plot point x axis value] >} distinct ProductID )

where Q2 values are similar yet unrelated to the x axis dimension (hmm, does that make any sense?).

Tommi

3 Replies
johnw
Champion III
Champion III

Set analysis expression cannot refer to the value of the dimension. They are applied globally, returning a single set (though not value) for the entire chart. If Q2 is not being restricted by the selections, this should work:

count(distinct if(Q2=[plot point x axis value],ProductID))

If Q2 is being restricted by the selections, and part of the reason you wanted set analysis was to remove these restrictions, then something like this:

count({<Q2=>} distinct if(Q2=[plot point x axis value],ProductID))

You may instead want to consider linking Q2 to your x axis value directly in the data model for the simplest and fastest expression:

count(distinct ProductID)

Or I may not be understanding the question.

Not applicable
Author

This solved the problem - thanks!

Not applicable
Author

Jep, this solved the problem - thanks!