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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
meckeard
Contributor III
Contributor III

IF in a calculated dimension

Hi All,

I have a bar chart that shows customer ages along the X axis with the count of customer with that age along the Y axis.  The dimension for this uses a field called Cust_Age.  That works fine but I need to only get the Cust_Age for 6 of my company locations that are in a field called Freq_BranchName.  I tried to update my dimension to a calculated Dimension like this:

=If(Match(Freq_BranchName, 'Blue Bell', 'Havertown', 'Lawrence Park', 'Limerick', 'Secane', 'Springfield' ), Cust_Age)

This didn't work.  It seemed to sum all the values for Cust_Age. 

I tried to put this logic in the "Enable Conditional" field but that made no change to my graph:

Match(Freq_BranchName, 'Blue Bell', 'Havertown', 'Lawrence Park', 'Limerick', 'Secane', 'Springfield' )

What can I do to get only Cust_Age where Freq_BranchName is equal to the 6 names above?

Thanks!

 

 

Labels (1)
1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

in your expression use set analysis like below 

Sum({<Freq_BranchName={'Blue Bell', 'Havertown', 'Lawrence Park', 'Limerick', 'Secane', 'Springfield'}>}Sales)

View solution in original post

3 Replies
dplr-rn
Partner - Master III
Partner - Master III

in your expression use set analysis like below 

Sum({<Freq_BranchName={'Blue Bell', 'Havertown', 'Lawrence Park', 'Limerick', 'Secane', 'Springfield'}>}Sales)

meckeard
Contributor III
Contributor III
Author

Dilipranjith,

 

Thanks, that was close to what I needed and I was able to get it to work.

Mark

dplr-rn
Partner - Master III
Partner - Master III

good to hear