Forum Discussion
B_Albuquerque
8 years agoFrequent Visitor
Cumulative Sum Comparison in Assymetrical Dates
Hello there. I need to make a comparison of cumulative sum for four semesters (see below) of users that are registered in the system. The problem is that these semesters are arbitrary, and are no...
- 8 years ago
So, I created a Date dimension table by using the following:
Modeling > New Table >
DateDim = CALENDAR( DATE( 2016, 9, 29 ) , DATE( 2018, 9, 22 ) )
With a custom column:
Semester = IF( AND( DateDim[Date] >= DATE( 2016, 9, 29 ) , DateDim[Date] <= DATE( 2017, 4, 2 ) ), "2017-S1" , IF( AND( DateDim[Date] >= DATE( 2017, 4, 3 ) , DateDim[Date] <= DATE( 2017, 9, 23 ) ), "2017-S2" , IF( AND( DateDim[Date] >= DATE( 2017, 9, 23 ) , DateDim[Date] <= DATE( 2018, 4, 2 ) ), "2018-S1" , IF( AND( DateDim[Date] >= DATE( 2018, 4, 4 ) , DateDim[Date] <= DATE( 2018, 9, 22 ) ), "2017-S2" , "Between Semesters" ))))Would something like this work?
CoreyP
Solution Sage
8 years ago
So, I created a Date dimension table by using the following:
Modeling > New Table >
DateDim = CALENDAR( DATE( 2016, 9, 29 ) , DATE( 2018, 9, 22 ) )
With a custom column:
Semester =
IF(
AND( DateDim[Date] >= DATE( 2016, 9, 29 ) , DateDim[Date] <= DATE( 2017, 4, 2 ) ),
"2017-S1" ,
IF(
AND( DateDim[Date] >= DATE( 2017, 4, 3 ) , DateDim[Date] <= DATE( 2017, 9, 23 ) ),
"2017-S2" ,
IF(
AND( DateDim[Date] >= DATE( 2017, 9, 23 ) , DateDim[Date] <= DATE( 2018, 4, 2 ) ),
"2018-S1" ,
IF(
AND( DateDim[Date] >= DATE( 2018, 4, 4 ) , DateDim[Date] <= DATE( 2018, 9, 22 ) ),
"2017-S2" ,
"Between Semesters" ))))Would something like this work?
B_Albuquerque
8 years agoFrequent Visitor
I will try that as soon as I can, thank you.