Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
To simplify this example, imagine I have a tab with inventory such as:
Name | Actual_price | Price_before |
---|---|---|
Water | 5 | 4 |
Beer | 8 | 9 |
Coke | 6.5 | 6.5 |
Lemonade | 6 | 6 |
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.
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)
Try Like:
Count(If(Actual_price=Price_before,Name,0))
or
If( Actual_price=Price_before,Count(Name),0)
Regards
R
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)
Hi biel.II.s,
Let do this IF(Actual_price=Price_before,COUNT([Name]))
Do let me know after you tested it.
Regards,
Sokkorn
Johannes, thank you for your answer, it's exactly what I was looking for and it simplifies things a lot.
lakhina007, thank you for your answer, but it didn't work as I had in mind.