cancel
Showing results for 
Search instead for 
Did you mean: 

Last 5 months in CrossTab Lumira Designer

abarros123
Explorer
0 Kudos

Hi people,

My new challenge is to just show the last 5 months of profits in a CrossTab.

Sound easy but:

2018 - 1

2017 - 12

2017 - 11 ...

Is there some way to implement this in a CrossTab?

Thank you in advance!!

Accepted Solutions (1)

Accepted Solutions (1)

Hi, Andres

In the application launch event, you can get the current month:

month_now= Convert.floatToString(Date.createNow().getUTCMonth(),"#");

Then you can write the algorithm for determining the last 5 months in Global Script.
For example, if month_nov = 05, then the range = [01,02,03,04,05]
Limit this range to the DS data source for Crosstab (DS_1.setFilter(name_dimension, array))

Regards,

Yulia

Answers (1)

Answers (1)

TammyPowlas
Active Contributor

Hello Andres,

The "easy" answer is to create an offset variable in the BEx Query (assuming BEx is your datasource) that will automatically select the past 5 months and then send that to Lumira Designer. Performance in Lumira Designer will be faster too.

abarros123
Explorer
0 Kudos

Yep, thats the easy one...

But we do not have BEx Query and our Data Source is an universe.

Is there any other way?

Thank for your advise Tammy!