Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help filtering data

To simplify this example, imagine I have a tab with inventory such as:

NameActual_pricePrice_before
Water54
Beer89
Coke6.56.5
Lemonade66

Then, on a different tab, I want to count the number of items that have the same Actual_price and Price_before (like coke and lemonade in this example).

I'm trying to use something like this Count({<Actual_price={Price_before}>} Name). I'm guessing the solution should be fairly simple, but I've tried different variations without luck, I would appreciate any help.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

If these are in the same table, you can just add a flag for this as a field in the script:

If(Actual_price=Price_before,1,0) as SamePriceFlag

Then you can use Set Analysis to count the number of products with the same before and after price:

Sum({$<SamePriceFlag={1}>} SamePriceFlag)

View solution in original post

5 Replies
Not applicable
Author

Try Like:

Count(If(Actual_price=Price_before,Name,0))

or

If( Actual_price=Price_before,Count(Name),0)

Regards

R

Anonymous
Not applicable
Author

If these are in the same table, you can just add a flag for this as a field in the script:

If(Actual_price=Price_before,1,0) as SamePriceFlag

Then you can use Set Analysis to count the number of products with the same before and after price:

Sum({$<SamePriceFlag={1}>} SamePriceFlag)

Sokkorn
Master
Master

Hi biel.II.s,

Let do this IF(Actual_price=Price_before,COUNT([Name]))

Do let me know after you tested it.

Regards,

Sokkorn

Not applicable
Author

Johannes, thank you for your answer, it's exactly what I was looking for and it simplifies things a lot.

Not applicable
Author

lakhina007, thank you for your answer, but it didn't work as I had in mind.