cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Period over Period Change, Filtered by Current Attribute

I am trying to create a formula to find the monthly change in aggregated sales data.  But I would like to exclude any data from the previous month that does not compare with the current products in production. 

 

For example, Product A was dropped from production in the current month (1/31/2017).  I'd like the formula to compare the monthly change in product B and C, and exclude Product A. The formula must recognize that Product A data was not included in the current period and filter it from the total monthly change.

 

 

Product12/31/20161/31/2017Monthly Change
A100 -100
B20025050
C30035050
1 REPLY 1
Microsoft
Microsoft

Re: Period over Period Change, Filtered by Current Attribute

@amstreit92,

 

Could you please provide us some sample data, so that we can make further.

 

Generally, we can get previous month amount by using PREVIOUSMONTH function. It returns a table that contains a column of all dates from the previous month, based on the first date in the dates column, in the current context. Sample DAX expression.
=CALCULATE(SUM(InternetSales_USD[SalesAmount_USD]), PREVIOUSMONTH('DateTime'[DateKey])) 

 

Regards,

Charlie Liao

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors