Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Rolling 12 month based on master calenter selection

Hi All 

I have dataset like below table

Reference File : Rolling 12 month (.pbix) 

 

Month Start Date# New Client# Chrun ClientType of Revenue
01-12-20182 Non Recurring
01-12-201830 Recurring
01-01-20192 Non Recurring
01-01-20191 Recurring
01-02-20192 Non Recurring
01-03-2019 3Recurring
01-04-20191 Recurring
01-05-201942Recurring
01-06-20193 Recurring
01-07-20191 Non Recurring
01-07-20193 Recurring
01-08-20197 Non Recurring
01-08-201911Recurring
01-09-20191 Non Recurring
01-09-2019111Recurring
01-10-20192 Non Recurring
01-10-20192 Recurring
01-11-20193 Non Recurring
01-11-2019102Recurring
01-12-20193 Non Recurring
01-12-2019111Recurring
01-01-202052Recurring
01-02-20201 Non Recurring
01-02-202042Recurring
01-03-20201 Recurring

 

i want to create two measure

Ending Client & Starting Client 

 

# Starting Client = Previous Month of # Ending Client Value

# Ending Client = (# Starting Client + # New Client) - # Chrun Client

i have created master calendar by using Month start date 

i want to show rolling 12 month value based on selected month 

 



if i selected Month Filter value is Mar-2020 and Type of Revenue = Recurring i want to show rolling 12 month value  like below image

 

  • Anonymous 

    We have made it a cumulative  total, As there is no last month value.

    Cumm Last month (Starting Client )= CALCULATE(SUMX(Table,Table[# New Client]-Table[# Chrun Client]),filter(date,date[date] <=maxx(date,max(dateadd(date[date]),-1,month))))

    Cumm This Month (Ending Client )= CALCULATE(SUMX(Table,Table[# New Client]-Table[# Chrun Client]),filter(date,date[date] <=maxx(date,date[date])))

     

    Did not check pbix. Will do if this does not help

     

1 Reply

  • Anonymous 

    We have made it a cumulative  total, As there is no last month value.

    Cumm Last month (Starting Client )= CALCULATE(SUMX(Table,Table[# New Client]-Table[# Chrun Client]),filter(date,date[date] <=maxx(date,max(dateadd(date[date]),-1,month))))

    Cumm This Month (Ending Client )= CALCULATE(SUMX(Table,Table[# New Client]-Table[# Chrun Client]),filter(date,date[date] <=maxx(date,date[date])))

     

    Did not check pbix. Will do if this does not help