2. Expression: Counting the number of open Transaction based on date selection on UI. i.e. Based on selected date find the latest record for each transaction and verify for Open and Close and only report open as on that date.
The aggregation should be on Country level (i.e. Highest level).
The expression used gives a proper output as expected but when a state is selected output is aggregated based on State.
Please let me know on how can we avoid aggregating on State which is a dimension in Pivot Table when a state is selected.
Without Selection of State Say "ABC" state show a number as 100.
But when State "ABC" is selected number changes to 120. Expectation is to show 100 even if ABC is selected.
Pivot table should also have only one line item if a state ABC is selected.
A pivot table should show a count of an item which is in open status. Here a particular item will exists in two or more states. In one state, the item will be in Open status and in other state, the same item will be in closed status. We need to take the latest record of each item and check for the status regardless of State, if it is Open then it is countable. So the count should be based on item not on the State.
To be clear, if I select a state(Dimension), the item should be countable only if it is the latest record and in Open status.
Even if the item is in Open status and not the latest record, it should not be a countable one.
For this I have used the below logic to neglect the State(Dimension) . By doing this, Pivot table is showing the value for all the states. But the Pivot table should show only the dimension which I have selected.