### How to count number of row depending on condition ?

Hi Gurus,

I would like to know if there is a way to solve the issue at query level. The query display data of MM-PO item level with KF that display percentage.

The active condition is on the KF that restrict rows when KF > 20%.

How can i sum the rows according to the condition result ?

ThX.

10|10000 characters needed characters exceeded

• Jan 04, 2018 at 09:03 PM

Hi,

Can you try using workbook,insert your query with active condition with row number as key figure in one column and add one formula to add this KF. I think it will give you toltal number of rows for 20 %.

Regards,

Ganesh Bothe

10|10000 characters needed characters exceeded
• Hi Ganesh,

I can't use workbook as my query is used as a data source for Design studio application.

Thank you,

Guy.

• Jan 11, 2018 at 10:09 AM

hi,

quite easy: create a calculation variable:

=([KF]>20%)*[KF]

the > works as a Boolean 1 for true and 0 for false, you can multiply that by your KF

so you will have

0

0

25

33

0

22

80

0

to sum up