Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
jamey_copeland
Contributor
Contributor

General Reference to X Axis Dimension

Hello,

I am creating a reference line on a scatter chart where the x axis is set by a drop down from the variable extension. I would like to change the reference line expression depending on the axis value.

So far I have tried something like this:

Median(Aggr(Sum({$<BookFscYearStr = {'2017'}, FiscalQuarter = {'Q1'}>}NETSALESAMTUSD), If(vVariableSelector = 1, Region,Platform))

The expression doesnt seem to like the If Statement in the Aggr function.

I was thinking that if there was a generic way to refer to the x dimension than this wouldnt be an issue.

Something like:

Median(Aggr(Sum({$<BookFscYearStr = {'2017'}, FiscalQuarter = {'Q1'}>}NETSALESAMTUSD), x.dim)

However I havent found a way to generically refer to the x dimension.

Any ideas?

3 Replies
sunny_talwar

How do you change your dimension? If the variable decides which dimension to use, then this could work

Median(Aggr(Sum({$<BookFscYearStr = {'2017'}, FiscalQuarter = {'Q1'}>}NETSALESAMTUSD), $(=If(vVariableSelector = 1, 'Region', 'Platform')))

jamey_copeland
Contributor
Contributor
Author

Hello,

Unfortunately this still isnt working. I have verified that by putting the variable in a text area that the values are changing from 1 to 2, but I dont think the aggr function likes the if statement in the second argument.

Jamey

sunny_talwar

Would you be able to share a sample to show the issue?