We have a simple business case to show the prices of all product at different types for e.g we have Products Page Group where different types of products can be added and inside every type there can multiple items of same Product can be added where we have price defined for each product
i want to create Declare expression to calculate prices at every product type level but not sure how to set the Page Context while defining so.
It does not look good to be a correct use case for using Declare Expression. Here is the reason. It is possible to use reference of list or group type property. In change tracking you might use property like .Products().ProductTypes() but it is not recommended without specifying the indexes. Because the change will be tracked on every item of the page group/page list. Only if specific indexes can be specified like .Products(ABC).ProductTypes(1) then it's ok. But I do not think that will be a possible option for you.
Hence, it is better if you may use some decision table or map value from a Data Transfer but not declaratively.