Home Forums Power Pivot calculate different filter text field

This topic contains 2 replies, has 2 voices, and was last updated by  rogeriotortosa 4 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
• Author
Posts
• #3833

rogeriotortosa
Participant
• Started: 6
• Replies: 12
• Total: 18

I’m having trouble calculating the total amount of sale, provided that not be for some customers

Example:

Problem:
both formulas are returning the same value, instead of the value as above

Help me

att

Rogerio

#3834

tomallan
Keymaster
• Started: 0
• Replies: 417
• Total: 417

Hi Rogerio,

Logical expressions that work with a logical “||” and negations can often catch us off our guard.

As an operator for the non-exclusive logical “OR”, when “||” is used, if any one (or only one) condition is true, the expression is true.

The expression

dimClientes[idCliente]<>“36251” || dimClientes[idCliente]<>“58471”

is always true. If the client’s id is 36251, then it must be true that the client’s id is not 58471, and the “at least one condition” criteria is satisfied. The reverse is also true on the “at least one condition criteria”. If the client is id is neither 36251 or 58471, both conditions are true.

Since we are working with negations, try:

dimClientes[idCliente]<>“36251” && dimClientes[idCliente]<>“58471”

and let me know how things progress.

Tom

#3836

rogeriotortosa
Participant
• Started: 6
• Replies: 12
• Total: 18

perfect

tks Tom

Viewing 3 posts - 1 through 3 (of 3 total)

The forum ‘Power Pivot’ is closed to new topics and replies.