cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Marcin Member
Member

12 month sum indicator

Hi,

 

let assume we have data like this :

 

DateSales
01.01.2017-30
01.02.201794
01.03.201763
01.04.201790
01.05.201750
01.06.2017-14
01.07.201746
01.08.2017-51
01.09.2017-76
01.10.201765
01.11.2017-14
01.12.2017-65
01.01.201853
01.02.2018-34
01.03.201886
01.04.2018-51
01.05.201826
01.06.2018-25
01.07.201885
01.08.2018-24
01.09.201871
01.10.2018-10
01.11.201810
01.12.2018-70

 

I would like to create measure that will be working as 12 months sum but only in 12 months period of time : time <= maxdate, time >= maxdate - 12.

 

I have created a measue like this :

Last 12 months = CALCULATE(SUM(Table1[Sales]),DATESINPERIOD(Table1[Date],LASTDATE(Table1[Date]),-12,MONTH))
 
But now I would like to adjust it to get only last 12 month values but sum to be caluculated also as a total of months before last 12 month. 

 

I would like to get a view like this ( alwyays for last 12 months )  and count how many of values per month was negative. 

 

 Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV
Super User IV

Re: 12 month sum indicator

See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

1 REPLY 1
Super User IV
Super User IV

Re: 12 month sum indicator

See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors