Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
palomaliang
Contributor II
Contributor II

how to find one value in a dimension in the chart

Hi,  I want to create a chart for one dimension with multiple values, but only check if it with one specific value.

One A with multiple B

AB
1231100
1231200
1231400
1231500
4561100
4561600

 

I need a table shown like this

Awith 1200with 1600 
123YN
456NY
Labels (2)
2 Solutions

Accepted Solutions
Vegar
MVP
MVP

I've used the expression  below in my With 1200 column

IF(count({<B={'1200'}>}B), 'y', 'n')

image.png

See attachment

View solution in original post

Taoufiq_Zarra

@palomaliang  are you looking for ?

in dimension A

Measures

with 1200: if(count({<B={1200}>} A)>0,'Y','N')

with 1600:if(count({<B={1600}>} A)>0,'Y','N')

 

output:

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

6 Replies
Vegar
MVP
MVP

I've used the expression  below in my With 1200 column

IF(count({<B={'1200'}>}B), 'y', 'n')

image.png

See attachment

Taoufiq_Zarra

@palomaliang  are you looking for ?

in dimension A

Measures

with 1200: if(count({<B={1200}>} A)>0,'Y','N')

with 1600:if(count({<B={1600}>} A)>0,'Y','N')

 

output:

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Kushal_Chawda

@palomaliang  with A as dimension use below expression

// With 1200
=if(index(Concat(DISTINCT B),'1200'),'Y','N')

// With 1600
=if(index(Concat(DISTINCT B),'1600'),'Y','N')
palomaliang
Contributor II
Contributor II
Author

Thank you Vegar, it works. 

palomaliang
Contributor II
Contributor II
Author

Thank you Taoufiq_Zarra, it works. 

palomaliang
Contributor II
Contributor II
Author

Thank you Kush, but it's not all right.