Hi!
I need help with a customer requirement.
There are two cost centers that were discontinued this year, and the client wants to see only until the last month of life of these cost center (there are real data, budgets and adjustments for both centers) .
I made a link table,and I'm thinking there to do the condition where.
In normal words it would be something like this:
"where, cost center 1 is until May 2019 and cost center 2 until August 2019".
the other cost centers should still be shown anyway.
it's possible?
thanks!
I did!
I finally came up with this idea.
Remove those cost centers first and then I add them with the condition of the dates.
I will exclude the data after June in the fact table in the script.
When loading the fact table, I will do like this:
FactTable:
load field 1, field 2... from somesource
where not (([Cost centre]=1 and Date>'31/05/2019') or ([Cost centre]=2 and Date>'31/05/2019') );
The where clause is all you need, right?
Fei
I did!
I finally came up with this idea.
Remove those cost centers first and then I add them with the condition of the dates.
xufei123!
Thanks for your help.
Your idea is very similar to what occurred to me later ! 😄
Same result with loading once and use this, right?
Where not ((CC='863' and @PeriodoNum>= 40909 and @PeriodoNum<43586) or (CC='861' and @PeriodoNum>= 40909 and @PeriodoNum<43586));