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: 
vignesh_s
Creator
Creator

hi,have doute in pivot table(Enable condition)in dimension tab

Dimension:

LOAD * INLINE [

    _Dimention

    ProductName

    ProductID

    Office

    OfficeCity

    OfficePhone

    OfficeCountry

];

and i have a productName in Product Table too,i created a pivot table with dimentions as ProductNAme ,Office etc and given expression as below,

=SubStringCount(Concat(_Dimention,'|'),'ProductName')

can any expalin how that expression working

1 Solution

Accepted Solutions
omkarvamsi
Creator
Creator

i guess you are asking about adhoc reporting.

=SubStringCount(Concat(_Dimention,'|'),'ProductName')


concat will create a string with delimter '|'.

for example: A|B|C|D|E|F|B


substring will return count of the word/letter you mentioned in substring count

in mentioned example if we write as substringcount('A|B|C|D|E|F|B','B')

the above will return 2 as B is repeating two times.



in your example the substringcount(concat()) will retune 1 as ProductName is repeated once in the _Dimension.

as it returns one,the conditon enable and become true.


so when even you click on _Dimension the count shows 1 and condition will enable and chart will display respective selection.


Hope it helps you.


Regards

Om

View solution in original post

4 Replies
Anil_Babu_Samineni

Let's talk with inline

_Dimension is the field which contains A, B, C, D ??

So, Concat(_Dimension, '|') -- Will return A|B|C|D

From here, We are going to use

SubStringCount(concat(_Dimension, '|'), 'C') -- Which contains one as Count

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
omkarvamsi
Creator
Creator

i guess you are asking about adhoc reporting.

=SubStringCount(Concat(_Dimention,'|'),'ProductName')


concat will create a string with delimter '|'.

for example: A|B|C|D|E|F|B


substring will return count of the word/letter you mentioned in substring count

in mentioned example if we write as substringcount('A|B|C|D|E|F|B','B')

the above will return 2 as B is repeating two times.



in your example the substringcount(concat()) will retune 1 as ProductName is repeated once in the _Dimension.

as it returns one,the conditon enable and become true.


so when even you click on _Dimension the count shows 1 and condition will enable and chart will display respective selection.


Hope it helps you.


Regards

Om

vignesh_s
Creator
Creator
Author

Thank you so much ,it held me a lot

omkarvamsi
Creator
Creator

you are welcome Vignesh