Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
alexpegg86
Helper I
Helper I

PARALLELPERIOD not working as I want it to

hi all,

 

I'm trying to use PARALLELPERIOD to return sales data for the same period last year. For some reason, it shows the annual total, but i want to see it by month. See below the screenshot of the measure:

alexpegg86_1-1720520624454.png

 

 

Any ideas on why this may be?

 

Thanks.

 

1 ACCEPTED SOLUTION

@alexpegg86 

You can use both:

Value Previous Year=
CALCULATE(
    SUM('Total Soft Drinks Output'[Spend]),
PREVIOUSYEAR(DateTable[Period End Date])
)
 
or
 
Value Previous Year=
CALCULATE(
    SUM('Total Soft Drinks Output'[Spend]),
PARALLELPERIOD(DateTable[Period End Date], -1, YEAR)
)
 
Please, accept my answer as a solution.
 
BBF

View solution in original post

5 REPLIES 5
BeaBF
Super User
Super User

@alexpegg86 Hi! Can you paste sample data and the measure? or share the pbix file

 

BBF

Hi @BeaBF ,

 

I've saved them to google drive - hopefully the links work for you:

Power BI file: https://drive.google.com/file/d/1OJ82btg26MRy_cvH3BWhuOQ5eN0ZA705/view?usp=drive_link

 

csv data source: https://drive.google.com/file/d/1CiuDqnm0so5Tsc2nNPzSt28RozerhU3u/view?usp=drive_link

 

 

@alexpegg86 I'va found the solution.

You need a Calendar Table, i've created one in this way:

DateTable = DISTINCT('Total Soft Drinks Output'[Period End Date])
 
Then, you have to create a relationship between this new table and the Total Soft Drinks Output (one to many), in this way:
BeaBF_0-1720532117796.png

 

At least, adapt your measure as:

Value Previous Month =
CALCULATE(
    SUM('Total Soft Drinks Output'[Spend]),
    PARALLELPERIOD('DateTable'[Period End Date], -1, MONTH)
)
or also:
Value Previous Month =
CALCULATE(
    SUM('Total Soft Drinks Output'[Spend]),
PREVIOUSMONTH(DateTable[Period End Date])
)
you need to use date of the new DateTable in the Visual, so you need to calculate Period, Year, on the new DateTable. It will work fine:
BeaBF_1-1720532514513.png

 

if you send me your mail on pvt message i can send you the pbix arranged.

 

if it's ok, please accept as solution.

 

BBF




Thanks @BeaBF .

 

I actually want the value to be the value for the same period last year... so June 2024 would show June 2023... would i just change the measure to:

 

CALCULATE(
    SUM('Total Soft Drinks Output'[Spend]),
    PARALLELPERIOD('DateTable'[Period End Date], -12, MONTH)
)
 
 
?

@alexpegg86 

You can use both:

Value Previous Year=
CALCULATE(
    SUM('Total Soft Drinks Output'[Spend]),
PREVIOUSYEAR(DateTable[Period End Date])
)
 
or
 
Value Previous Year=
CALCULATE(
    SUM('Total Soft Drinks Output'[Spend]),
PARALLELPERIOD(DateTable[Period End Date], -1, YEAR)
)
 
Please, accept my answer as a solution.
 
BBF

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.