cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MDochez Frequent Visitor
Frequent Visitor

parallelperiod does not work for me

Hi all, 

 

I struggeling with parallel period: 

i want to get the total sales of previous month, this is the formula I use: 

 

sales previous month = CALCULATE([Sum of sales]; PARALLELPERIOD('Sales Warranty'[timeperiod date]; -1; MONTH))
 
if I use this formula, i get the total sales of all months also previous years except the sales of this month. 
 
How can I get only the sales of last month?
 
can you guys help me?
3 REPLIES 3
Microsoft v-yulgu-msft
Microsoft

Re: parallelperiod does not work for me

Hi @MDochez ,

 

Make you used a calendar table which contains continuous dates. For more details, please refer to this blog.

DateAdd vs ParallelPeriod vs SamePeriodLastYear; DAX Time Intelligence Question

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MDochez Frequent Visitor
Frequent Visitor

Re: parallelperiod does not work for me

Hi  @v-yulgu-msft,

I use a date table created with this query:

 

Dates = var BaseCalendar = CALENDARAUTO()
RETURN GENERATE(BaseCalendar; var Basedate = [Date] var Yeardate = YEAR( Basedate) var monthnumber = MONTH(Basedate)
  Return row("day"; Basedate = [Date];
    "Year"; Yeardate;
    "Month Number"; monthnumber;
    "Month"; FORMAT ( Basedate; "mmmm" );
    "Year Month"; FORMAT ( Basedate; "yy mmm" )))
BR,
Maxim
 
MDochez Frequent Visitor
Frequent Visitor

Re: parallelperiod does not work for me

Hi @v-yulgu-msft 

 

can you help please? 

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

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