Dynamic selection in procedure

Options

Hi Community,

 

I'm struggling with a procedure I'm creating.

I ask the user to select a month and I do a dataflow using this month.

Then I need to get the month following the selected month if not December. I'm not sure how to do that.

 

Could you help me please ?

Tagged:

Answers

  • Nicolas CHIGROS
    Nicolas CHIGROS Active Partner
    April Badge of the Month First Anniversary Level 200: Leveraging Board for Business Insights Level 100: Foundations of Building in Board
    edited March 2020
    Options

    Hello Aurore Lb

     

    If you are using the standard Time dimensions, I can see 2 solutions in you're dataflow:

     

    1. in the block you want next month, you can use a positive offset in the Time functions tabs to get the next month. However December will get you next January. You may use a entity column and a column algorithm with an "if" statement if you need to get a different value for December.image
    2. An alternate solution would be to use a Dynamic Offset in The DataFlow process. In that case you need to load a cube with 1 for each month (expect maybe december) 

    image

    Regards

  • Andrea Florio
    Andrea Florio Active Partner
    First Anniversary First Comment 5 Up Votes 5 Likes
    Options

    Hello Aurore Lb

    i think with first solution suggest by Nicolas CHIGROS you don't have problems, because you can use 'if then else' in 'GoTo' tab of Configure Action in the procedure.

    In 'if then else' you can use a 'REFER TO SELECT', so you can select all month without December and call a group with the offset of month, else call a group without offset.

    Regards

    Andrea

  • Hello Nicolas CHIGROS and Andrea Florio,

     

    Thanks for your answers.

    I managed to make it work with the 2nd solution. I created a flag cube with dimension Month and 1 as value except for December. 

    I then put an if-then-else statement checking the value of the flag cube for the month previously chosen.

    If the value is 1, the procedure enters in a group where there is a dataflow using the dynamic offset on the target cube to select the following month.

     

    About the 1st solution I didn't manage to use the period offset function on the target cube.