How to dynamically select the current and the previous month

Options
LATTALI AHMED
LATTALI AHMED Active Partner
First Comment 5 Likes First Anniversary

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

  • Helmut Heimann
    Helmut Heimann Employee
    March Badge of the Month February Badge of the Month Community Captain April Badge of the Month
    edited March 2020
    Options

    Hello Ahmed Lattali,

     

    you could use the dynamic selection:

     

    image

    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

  • Daniele Di Lorenzo
    edited March 2020
    Options

    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

     

    image 

     

    image

  • LATTALI AHMED
    LATTALI AHMED Active Partner
    First Comment 5 Likes First Anniversary
    Options

     

    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

  • Federico Cazzalini
    Options

    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

  • 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,

  • Daniele Di Lorenzo
    Options

    Hi interested typ

    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.

  • 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.

  • Unknown
    Options

    Hi Daniele Di Lorenzo

     

    Can you attach a screenshot of your relationship.?? Thant will be really helpful.

  • Daniele Di Lorenzo
    edited March 2020
    Options

    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

     

    image

    imageimage