Based on your provided table-snippet I could imagine to add the created period to the sold-record of an Order, for example with something like this:
load Date, Order, status from source;
load Order, 'sold' as status, monthname(Date) as period_X
resident t where status = 'created';
By selecting your wanted periods within period_X and an expression like count(distinct Order) should return your needed numbers.
a field, a button, something... essence
i want to create it so i can select it
i will try to clarify
in the load script:
if (status='created', 1,0) as flag;
So when i select 1 later in the front end, it shows only created order in the given time frame.
But this flag is static, so when the period changes, the flag also should change, therefor I have to use P()
the question is - is it possible to avoid using P() ?