cancel
Showing results for 
Search instead for 
Did you mean: 

Statistic count in context

Former Member
0 Kudos

Hello,

For one mapping, I have to know the number of context with value in a sub context.

Have a look on  my example.

<Context_1>

    <VALUE_CONTEXT_1>"1"</VALUE_CONTEXT_1>

    <Context_2>

        <vALUE_Context_2>"1"</vALUE_Context_2>

     </Context_2>

     <Context_2>

        <vALUE_Context_2>"2"</vALUE_Context_2>

    </Context_2>

     <Context_2>

        <vALUE_Context_2>"3"</vALUE_Context_2>

    </Context_2>

</Context_1>

<Context_1>

    <VALUE_CONTEXT_1>"2"</VALUE_CONTEXT_1>

</Context_1>

<Context_1>

    <VALUE_CONTEXT_1>"3"</VALUE_CONTEXT_1>

    <Context_2>

        <vALUE_Context_2>"4"</vALUE_Context_2>

     </Context_2>

     <Context_2>

        <vALUE_Context_2>"5"</vALUE_Context_2>

    </Context_2>

     <Context_2>

        <vALUE_Context_2>"6"</vALUE_Context_2>

    </Context_2>

    <Context_2>

        <vALUE_Context_2>"7"</vALUE_Context_2>

    </Context_2>

</Context_1>

My problem, is that I want to know the number of Context_1 with Context_2

In my example, the result would be 2

Thanks a lot for you help.

JC

View Entire Topic
JaySchwendemann
Active Contributor
0 Kudos

Did you try the "count" function? You should be able to map "Contex_2" to your destination field having the context of "Context_2" set to "Context_1". Sorry if that sounds confusing due to all the contexts 🙂 Please have a look at the attached image.

HTH

Cheers

Jens

Former Member
0 Kudos

Hello Jens,

Hello Rajesh,

I have used the count in statistical, but I don't have the right result.

Context_1 ------> Count   = 3

Context_2 ------> Count = 3  

                                     0

                                     3

Context_2 ------> Count = 6  (when I'm on Highest context)

But I need that the value would be equal 2

Thanks a lot

JC

former_member184681
Active Contributor
0 Kudos

Hi JC,

Try with: Context_2 -> collapseContexts -> count. This should give you the expected result.

Regards,

Greg

Former Member
0 Kudos

Hello Greg,

I had already try this, but my result is not the one expected :

Like you see, I have 3 and I need to have 2.

Case = Context_1

Line = Context_2

Thanks a lot.

JC

former_member184681
Active Contributor
0 Kudos

Dear JC,

Try with the following modification then:

Line -> exists -> createIf -> collapseContexts -> count

Regards,

Greg

Former Member
0 Kudos

Thanks Greg,

Now it's working.

Many to thanks to everyone for your help.

JC