Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
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