Page 1 of 1

replace a subset value in db function

Posted: Thu Oct 12, 2017 12:27 pm
by Analytics123
Hi,

I have to replace a subset value in place of hard coded month in the below DB expression

['Average DSO'] =DB('AR History', !Customers SoldTo Only, 'US01', 'Jul 2017', 'All Currencies', 'Local Currency', 'ASSETS', 'All Customer Types', '6 month DSO');

I have a subset name called Months - Prior Month which has one item .

If we cannot use the dynamic subset in rules, how can i generate the last completed month which is sep 2017 with in rule.

Thanks,

Re: replace a subset value in db function

Posted: Thu Oct 12, 2017 12:32 pm
by jim wood
Lookup up cube may be?

Re: replace a subset value in db function

Posted: Thu Oct 12, 2017 12:44 pm
by tomok
You have two options that I can think of; 1) have a lookup cube (as has already been mentioned), or 2) create an alias on the time dimension and make the alias value for the current month equal to "Current Month". That way you can reference "Current Month" in your rule. When the next month rolls around you take off the alias for the old month and make the alias value for the next month be "Current Month". They both work so it comes down to personal preference.

Re: replace a subset value in db function

Posted: Thu Oct 12, 2017 12:45 pm
by ascheevel
Consolidation called 'Prior Month' would work too.

Re: replace a subset value in db function

Posted: Thu Oct 12, 2017 4:36 pm
by jim wood
I always lean towards a lookup cube as it can be used within multiple cubes if you don't have a shared time dimension or even multiple time dimensions within the same cube.