Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Specialist
Specialist

Concat()

I have a table of products and each product has one or more features.

Product  Feature

Car 1      Red

Car 1      4dr

Car 1       Leather seats

Car 2       5dr

Car 2        Red

etc.....you get the idea.

I have a table which shows each product, with all its features in a single column using the CONCAT function:

eg.    Car 1       Red; 4dr; Leatherseats

This works well. Except, if I SELECT a Feature (eg. Red), I (correctly) see all products which are Red, but I don't see their other features.

Is there a way I can show all Features for all Products which have the SELECTed Feature ?

Thanks

1 Solution

Accepted Solutions
Highlighted
Partner
Partner


It could be simpler

Concat({1<Model = p ({$})>} Feature,',')

This will select all rows for where the Models exists in the list of models in the current selection. But will ignore all other selection.

View solution in original post

9 Replies
Highlighted
MVP
MVP

Create Straight Table


Dimension

Product

Expression

Concat(Distinct Feature,'; ')

Highlighted
Specialist III
Specialist III

if I understood right, if you select on red,you want to know what are the features for each red car, right ?

Concat({1<Model =p ({<Feature = {$(=Concat(DISTINCT chr(39)&Feature&chr(39),','))} >} Model)>}Feature,',')
Highlighted
Specialist
Specialist

Ramon

Thanks very much. This works, although I am still trying to understand the set analysis logic here !

Highlighted
Partner
Partner


It could be simpler

Concat({1<Model = p ({$})>} Feature,',')

This will select all rows for where the Models exists in the list of models in the current selection. But will ignore all other selection.

View solution in original post

Highlighted
Specialist
Specialist

Yes, Steven, that works and is even neater !

Thanks

Highlighted
Creator III
Creator III

Hi Ramon Covarrubias  RamonCova06

Can you please tell me is the below expression works fine for this case.??

And in which cases it can deviate from result compared with your expression .??

Concat({1 <Product = {$(=concat( Distinct chr(39)&Product&chr(39),','))} >} distinct Feature,',')

here Product is same as model.

Thanks in Advance

Timanshu

Highlighted
Specialist III
Specialist III

it does not give you the same output because you want to match feature to feature and then get the Products that are availables for it, in your example you are comparing Product to Feature, though they would never match

Highlighted
Creator III
Creator III

Hi Ramon,

I checked my Expression. I think it works fine in this case. I am not comparing product to feature. I just wrote expression to filter only possible Products in addition to consider all feature values.

You can check this expression and if you could differ the two expressions then it would be very nice.

Highlighted
Specialist
Specialist

Hi Ramon

Your expression and Timanshu's both work for my requirement. I simply want to select the products (eg. red cars) and then show all features for these products. You expression may work for a more complicated requirement too.

Thanks to you both.