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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
eddywong71
Creator
Creator

How to create a new dimension split by Comma and count the value

My Dataset is like below.

Product
Apple,Orange
Apple
Orange
Orange, Banana
Banana
Apple,Orange,Banana

Then I create a new dimension : SubField([Product],',',1) as New Product. 

Product
Apple
Orange
Banana

May i ask what expression that i can use to count the product . I want the result as below.

Product Count
Apple 3
Orange 4
Banana 3

 

 

Labels (3)
1 Reply
brunobertels
Master
Master

hi 

See this post that may help 

https://community.qlik.com/t5/New-to-Qlik-Analytics/How-to-count-value-from-Comma-Separated-text/td-... 

you shall create a ID field with rec no or rowno() function in script 

 

regards