Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save $200. Learn More
Highlighted
Not applicable

Count of String in expression

Hi All,

Looking for product count  based on product ID in expression but product  Count should display  product name (string) ..like how we display in table and  count should be  4.

   

Product IDsum(sale)Product NameProduct count
110ABCABC
220DGCDGC
310JHGJHG
420HBCHBC
Total60 4

Thanks in advance

1 Solution

Accepted Solutions
Highlighted
payalgosar
Contributor II

Re: Count of String in expression

Try this expression: if(Dimensionality() = 0, Count(DISTINCT [Product ID]),  [Product Name])

Hope this is helpful to you.

View solution in original post

9 Replies
Highlighted

Re: Count of String in expression

Why not, Simply Count([Product Name])

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
payalgosar
Contributor II

Re: Count of String in expression

Is that you want to display

  1. Product name in Product count field? and
  2. in Product count field - total you want to display 4 ?
Highlighted
varshavig12
Valued Contributor

Re: Count of String in expression

Something like this ,

Highlighted
Not applicable

Re: Count of String in expression

Yes i want to display 

  1. Product name in Product count field and
  2. in Product count field   i  want to display total count  4 . This total count is based on  Product ID
Highlighted
varshavig12
Valued Contributor

Re: Count of String in expression

Output:

Dim:

Exp:

Highlighted
payalgosar
Contributor II

Re: Count of String in expression

Try this expression: if(Dimensionality() = 0, Count(DISTINCT [Product ID]),  [Product Name])

Hope this is helpful to you.

View solution in original post

Highlighted
varshavig12
Valued Contributor

Re: Count of String in expression

Kavya can try it.

Highlighted
Not applicable

Re: Count of String in expression

Hi Kavya Shree,

I think are you Expecting only total count? if yes,Do like this

Just write the Expression If(product-id = product-id,' ')  just give the space

and select text count inTotal mode.

2017-01-06_1555.png

then you get out put like this

2017-01-06_1557.png

Not applicable

Re: Count of String in expression

Thanks everyone