Jump to content

PreviousPeriod combined with IF or CASE


Eric Hans van Wingerden 4

Recommended Posts

Attached please find a DXP with a calculated column. I have a column in which I want the previous value of AMOUNT, so the value of Previous month, within a customer. In the example this works perfectly.

Max([Amount]) over (Intersect(PreviousPeriod([Month]),[Customer]))

However, What I really want is that the first month this column should just be the AMOUNT of the current Month:

If([Ranking]>1,Max([Amount]) over (Intersect(PreviousPeriod([Month]),[Customer])),[Amount])

 

it skips the second month

 

Am I doning something wrong YOur help would be appreciated!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...