Skip to main content
Newcomer
February 15, 2022
Solved

How to grab Prior 6 months in CV

  • February 15, 2022
  • 4 replies
  • 0 views

Hi All,

 

I'm trying to display prior 6 months in my cube view. For e.g. if my WF time is 2021, I want the CV to show last six months in 2020 (Jun - Dec) and so on.

I tried using half year member filter, but it didn't work as it should. Any suggestions will be appreciated.

Mustafa_A_0-1644950863065.png

 

Thank you,

Mustafa

Best answer by db_pdx

Probably lots of ways to build this, and it will vary based on you need (moving periods vs static periods).  A few potential solutions for static periods:

T#YearPrior1(|CVTime|)H2.Months

T#PovPriorYearM6.AllNextInYearInclusive

The documentation has good coverage on this area: Platform Guides > Design and Reference > Cube > Time Functions and Workflow References

4 replies

Newcomer
February 15, 2022

Hi - Try the using this as your column member filter: T#Year(|CVTime|)PeriodPrior5(|CVTime|), adjusting the number after prior period to the appropriate number of months prior

Newcomer
February 15, 2022

Hi kmdyda 

I tested it out. It pulls in YR 2016 instead of the ending six months. 

Mustafa_A_0-1644959864104.png

 

Newcomer
February 15, 2022

Instead of |CVTime| try your |WFTime| as I'm guessing your Cube View POV is set to 2016 while WF POV is set to 2021

Newcomer
February 15, 2022

Also, for a total column X number of periods back, take a look at the ViewXXMonthTotal, like in example below

"Trailing T#WF:V#Trailing12MonthTotal:Name("LTM")

db_pdxAnswer
Contributor
February 15, 2022

Probably lots of ways to build this, and it will vary based on you need (moving periods vs static periods).  A few potential solutions for static periods:

T#YearPrior1(|CVTime|)H2.Months

T#PovPriorYearM6.AllNextInYearInclusive

The documentation has good coverage on this area: Platform Guides > Design and Reference > Cube > Time Functions and Workflow References

Newcomer
February 15, 2022

Thank you db_pdx 

T#YearPrior1(|CVTime|)H2.Months worked!!   I just needed to replace CVTime with my own parameter.  

 

Will check it out. Appreciate it.

 

Member
February 22, 2022

How would you do this if you wanted the month prior to that half year? For example I want to see december 2021 for the first 6 months in 2022, but in the second 6 months I want to see June?

 

Thanks!

Newcomer
February 22, 2022

So, you want to see HalfYear1 and HalfYear2 for prior years?

Using the solution from above. Try adding "HalfYears" variable.

T#YearPrior1(|CVTime|)HalfYears.Months

Member
February 22, 2022

Not quite, I'd like the Dec 2021 I have here to dynamically either show December or June based on what part of the half year they are in. I'm using T#Global.MonthsInHalfYear for the columns after the highlighted. Thanks!!

paulacrisp_0-1645547947911.png