0

# Count along with match function in Webi

Dec 20, 2016 at 02:13 AM

182

Hello Experts,
I have the below table in webi

and require the "count of occurance of IMP at the beginning of the Description field for each product", I should extract the below table.

Thanks,

Vishal P Dec 20, 2016 at 02:17 AM
0

Re submitting the query as the tables were not clear

Hello Experts,
I have the below table in webi

and require the "count of occurance of IMP at the beginning of the Description field for each product", I should extract the below table.

Share
Former Member Dec 20, 2016 at 09:48 AM
0

Hello Vishal

I guess, Count cannot be used over Match since it returns Boolean value. I tried like below .

1. Imp-Matching= Match([Desc];"IMP*") It returning 1's & 0's.

2. Create variable which converts the above variable to Number using Tonumber function; Imp-Match-Meas = ToNumber([Imp-Matching])

3. count the matching using variable with = sum([Imp-Match-Meas]) foreach ([Product]).

similarly use "Not" function in first variable to achieve non matching count.

Hope it helps

Regards

Venkatesh

Share
Kuldeep Ghosh Dec 20, 2016 at 09:55 AM
0

Your logic should work. Just instead of count use Sum(). See if that helps.

=Sum(Match([Description]; "IMP*")) In ([Product])

Show 1 Share

Hi Kuldeep,

I am not getting the desired output by using the above formula.

Thanks,

Kuldeep Ghosh Dec 20, 2016 at 11:52 AM
0

I tried and it is working for me:

[IMP Match]= Sum(Match([Description];"IMP*")) In ([Product])

[IMP No Match] =Sum(If(Match([Description];"IMP*")=0) Then 1 Else 0) In ([Product])

sample.jpg (76.2 kB)
Share
Vishal P Dec 26, 2016 at 08:50 AM
0

Thank you Kuldeep, is working fine.

Share