cancel
Showing results for
Did you mean:
Helper I

## Total value is going less when filter is not applied

I am calculating total NCA PPM by using total received from NCA table and the Quantity received from Difot table. The total NCA PPM is correct or more when it is filtered by month, but less when it is not. As it is shown below in the image, total NCA PPM is more when it is filtered by April month, but less when the filter is not applied.

Here is the formula I am using to calculate total NCA PPM :

``DIVIDE(SUMX(NCA,NCA[QTY Rejected]),SUMX(RELATEDTABLE(Difot),Difot[Quantity Recieved]))*1000000``

As you can see, NCA PPM is less when it is not filtered by month (1376), but only 981 when it is not. I suppose the total NCA PPM should have been more when the month filter is not applied. This is confusing and I am not sure what the problem is here.

1 ACCEPTED SOLUTION
Community Support

Hi @Surafel ,

In the Total part, the formula calculates (the total value of NCA[QTY Rejected]) / (the total value of Difot[Quantity Recieved]) in the selected range, so there may be some months's value greater than the value when it is not filtered.

The following is my sample data, and my measure is:

``````NCA PPM =
DIVIDE(
SUMX(NCA, NCA[QTY Rejected]),
SUMX(RELATEDTABLE(Difot), Difot[Quantity Recieved])
)``````

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 REPLIES 2
Community Support

Hi @Surafel ,

In the Total part, the formula calculates (the total value of NCA[QTY Rejected]) / (the total value of Difot[Quantity Recieved]) in the selected range, so there may be some months's value greater than the value when it is not filtered.

The following is my sample data, and my measure is:

``````NCA PPM =
DIVIDE(
SUMX(NCA, NCA[QTY Rejected]),
SUMX(RELATEDTABLE(Difot), Difot[Quantity Recieved])
)``````

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Super User IV

@Surafel ,  This calculation seems fine other than one misplaced paranathesis

DIVIDE(SUM(NCA[QTY Rejected]),SUMX(RELATEDTABLE(Difot),Difot[Quantity Recieved]))*1000000

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Proud to be a Super User!

Announcements