How to dynamically select the current and the previous month
Hello Community,
Quick question, Is there a way to select the current + last month in only one selection action within a procedure ?
Best regards,
Ahmed Lattali
Answers
-
Hello Ahmed Lattali,
you could use the dynamic selection:
This way, you are able to dynamically select a time entity based on either the current date or another cube.
You would need to use the option "Based on Cube"; your cube for this should have a "1" (integer) for every period you would like to be selected.
Another option could be to use the procedure step "select entity based on" - using the same "select-cube".
Hope this helps!
Regards,
Helmut
2 -
Hi,
In addition to Helmut reply, here is an example:
In my databases I always create a cubes group for time selections, fed through a daily scheduled procedure (see pictures)
In this way I can set a lot of time dynamic selections, that are not feasible with the native ones.
Moreover I find a walkthrough for the bug in the Fiscal Year native dynamic selection, that is not working properly in current version ( I have 10.1.2, but it seems it's not solved in 10.1.4 also)
Hope this helps
Best regards
Daniele
4 -
Thanks Helmut Heimann and Daniele Di Lorenzo for your replies, As I thought, the only way to do so is to use a dedicated cube, I was trying to avoid this option for two reasons :
- We already have a lot of cubes that we only use in dynamic selections.
- The project is relatively big (we have already ~500 cubes) and it’s evolving, so we might face the risk of running out of cubes as the max number of cubes is 999.
But I guess we don’t have another choice, we should optimize our use of cubes more when developing the next modules.
Thanks again
Best regards
Ahmed Lattali
1 -
Hello Ahmed Lattali,
did you evaluate the use of a "custom time dimension" ?
you can create a new dimension which aggregates the "month" (let's call it "month to be analyzed") and link desidered months (current and previous) to it through a procedure.
be careful about the normalization of the "time tree".
hope this helps.
ciao,
federico
3 -
Hi, I agree with you, sometime a custom time dimension is "enough" for the customer needs and you don't need to create dedicated cubes.
Ahmed Lattali This approach is explained in an existing question from March 2018.
Regards,
2 -
I agree also about custom time dimension, I use them also.
As Federico Cazzalini said, the only thing to pay attention is the normalization.
Recently I increase the use of cubes because I can overcome the limit of 3 custom dimensions allowed and I globally find this approach more flexible for my purposes.
On the other side, dynamic selections are not usable in layout selections and in this case the custom entity is better.
1 -
I agree with your points. All these points could be good food for creating a Wiki resource on this topic, with Pros and Cons for each approach, such as the account tree for financial reporting.
1 -
Hi Ahmed Lattali,
I also prefer to use the custom time entities.
However if 3 is not enough, you can also use "normal" entities for selection purposes. For example you could have an entity called "Reporting Month" with members like current month, previous month etc. and link them to the time entity "Month" via a matrix cube which contains both entities and has a "1" wherever there's a match. Then you can put a Selector for the "Reporting Month" on the screen and add a dynamic select using your matrix cube.
Hope this helps.
Kind regards,
Gerrit
7 -
Can you attach a screenshot of your relationship.?? Thant will be really helpful.
0 -
look at the entuty "closed month".
please be noted that entity week is indipendent from month in most recent versions.
the closed month is fed through a data reader on tree day that reads itself; flags on months are set through proper ETL rules
0