cancel
Showing results for 
Search instead for 
Did you mean: 

Sum of distinct Vales from Table.

0 Kudos

Hi All.,

This is extension question for Previous Post
I was not able to edit the question thus starting new thread,

My requirement is I need to fetch all Distinct vale from table and sum it up.

Source

And Op I need is- (where Column B is not required)

Can some one please help.

0 Kudos

Source-

Destination-

Accepted Solutions (1)

Accepted Solutions (1)

Tom_N8
Contributor
0 Kudos

Hi Ayush,

Thanks for clarifying your changed requirement.
Change the formula to: =Sum(Max([Col C]) ForEach([Col B])) In([Col A])

Kind regards,

Tom

Answers (3)

Answers (3)

0 Kudos

Hi Tom,

Ok you might have replied on this before I modified my question,
Same is working fine for me if Col A is having single type of entry.
But if you see updated question Column A do have different set of data, and that is where count is not correct.

Tom_N8
Contributor
0 Kudos

Hi Ayush,

Maybe you can rephrase your question again and state your desired result? Your screenshots do not display anymore.

Thanks,

Tom

0 Kudos

Hi Tom,

Thanks for ur support.

But the formula is giving total count
if we consider above example it is giving (15+14) 29

Tom_N8
Contributor
0 Kudos

Hi Ayush,

Works for me:

Regards,

Tom

Tom_N8
Contributor
0 Kudos

Hi Ayush,

Try creating a new variable with the following formula:

=Sum(RunningSum([Col C];([Col B]))) In Block

This will return the desired result and also works for your previous example, provided you only have one distinct value for your values in Column B. As with your previous question, replace [Column C] with the new variable and then hide [Column B] from your table block.

This formula also works for your previous question.

I also recommend downloading the "Using functions, formulas and calculations in Web Intelligence" documentation from the SAP Help portal.

Kind regards,

Tom