cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Super User

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
Super User

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
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 54 members 1,043 guests
Please welcome our newest community members: