Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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
payalgosar
Creator II
Creator II

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
Anil_Babu_Samineni

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)
payalgosar
Creator II
Creator II

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 ?
varshavig12
Specialist
Specialist

Something like this ,

Not applicable
Author

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
varshavig12
Specialist
Specialist

Output:

Dim:

Exp:

payalgosar
Creator II
Creator II

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

Hope this is helpful to you.

varshavig12
Specialist
Specialist

Kavya can try it.

Not applicable
Author

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
Author

Thanks everyone