Hi Vishal,
In case if the data is like below, the fourth row C004 INDIA HOME would be considered as the end of product category has HOME. But it shouldnt consider the fourth row. Any suggestions?
| Product no | customer no | country | Product category | sale value | Total Sales value | Discount |
| P001 | C001 | US | Home | 5000 | ||
| P002 | C001 | US | HOME | 3000 | ||
| P003 | C001 | US | HOME | 2000 | ||
| P004 | C004 | INDIA | HOME | 4000 |
Regards,
FM.