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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Noak
Helper IV
Helper IV

Parallel period data by selected dates

Hi Guys,

can someone help me with getting sum of value of parallel period while using date filter?.

 

I tried to use the #parallel_period function but I think the Date filttering influnce it.

 

current table:

Untitled.png

 I would like to add lParallel_Period_total (last year) column to my matrix.

BR,
Noa.
1 ACCEPTED SOLUTION

You could use a calculated measure like this:

 

Parallel Period = 
VAR MinDate = MIN ( Date[Column] )
VAR StartDate = DATE ( YEAR ( MinDate ) - 1, MONTH ( MinDate ), DAY ( MinDate ) )
VAR MaxDate = MAX ( Date[Column] )
VAR EndDate = DATE ( YEAR ( MaxDate ) - 1, MONTH ( MaxDate ), DAY ( MaxDate ) )
RETURN
CALCULATE ( 
	[Measure],
	FILTER ( 
		ALL ( DateColumn/Table ),
		Date[Column] >= StartDate
			&& Date[Column] <= EndDate
	)
)

View solution in original post

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@Noak,

 

Check if the following link helps.

https://www.sqlbi.com/articles/compare-equivalent-periods-in-dax/

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

You could use a calculated measure like this:

 

Parallel Period = 
VAR MinDate = MIN ( Date[Column] )
VAR StartDate = DATE ( YEAR ( MinDate ) - 1, MONTH ( MinDate ), DAY ( MinDate ) )
VAR MaxDate = MAX ( Date[Column] )
VAR EndDate = DATE ( YEAR ( MaxDate ) - 1, MONTH ( MaxDate ), DAY ( MaxDate ) )
RETURN
CALCULATE ( 
	[Measure],
	FILTER ( 
		ALL ( DateColumn/Table ),
		Date[Column] >= StartDate
			&& Date[Column] <= EndDate
	)
)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.