Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
siva_boggarapu
Creator II
Creator II

technical issue(if data matches need to exclude) -help me

I  Have a field called   Courseid={a,b,c,d,e,f,g,h}  normally   when i count this i will get count =8.

but  when ever courseid matches with  {a} i have to exclude   b, c,d  courses .  so when ever i count  courseid {a}  then no need to count {b},{c},{d}.


that means   i have to count  only {a,e,f,g,h }


so finally  my courseid count =5 has to come  , please  help me


this calculation implemented in  chart level  not in script level

Regards'

Siva

10 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi Siva,

Introduce one mapping table like below

Course      Course Group

a               a

b               a

c               a

d               a

e               e

f                 f

g                g

h                h

Now use Count(Distinct [Course Group]) expression.

If you use this it is easier to handle, even if you new course groups.

Hope this helps you.

Regards,

Jagan.

its_anandrjs

Can you provide some samples some line to better understand.

Not applicable

Hi Siva, try like this.

=count({<Courseid-={'b','c','d'}>}Courseid)

siva_boggarapu
Creator II
Creator II
Author

Hi  jagan,

Thanks for reply.

Courseid={a,b,c,d,e,f,g,h}

but  my case  same lke above i should add one more condition like  if  courseid matches with {e} i have to exclude

{f},{g} as well..  here my count should be equal to ' 6 ' , so in the both cases i should take care..

so can u please reply back. how  i can proceed wih mapping table (in detail) if possible can u write a expression for the same:

Thanks

Siva

siva_boggarapu
Creator II
Creator II
Author

Hi Ram,

Here   not exclude directly .. (not possible to hardcode directly). i need to get dynamic changes like

when ever matches  with perticular courseid   then only i should exclude,

if not matches  i should count that courseid's  also.

Thanks

Siva

tresesco
MVP
MVP

Siva,

Create a small sample qvw and share here explaning your expected output there against the sample data. You would get your answer more precisely and faster as well.

jagan
Luminary Alumni
Luminary Alumni

Hi Siva,

Introduce one mapping table like below

Course      Course Group

a               a

b               a

c               a

d               a

e               e

f                e

g                e

h                h

Now use Count(Distinct [Course Group]) expression.

Note : For the above expression you will get count 3 not 6.

If you use this it is easier to handle, even if you new course groups.

Hope this helps you.

Regards,

Jagan.

rohit214
Creator III
Creator III

Hi ,

Try below code

=If(

GetFieldSelections(Course)='a',Count({1<Course-={'b','c','d'}>}Course),

    If(

        GetFieldSelections(Course)='e',Count({1<Course-={'f','g'}>}Course),

count({1}Course)))

thanks

Rohit

siva_boggarapu
Creator II
Creator II
Author

Hi jagan,

but my  case i have data near to  3.500 courseid's are there...  for this kind of will it be work out?   if it's possible means , can u also guide me how we can implement mapping table .

Thanks

Siva