cancel
Showing results for
Did you mean:
Member

## 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:

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

BR,
Noa.
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Member

## Re: Parallel period data by selected dates

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
)
)```
2 REPLIES 2
Community Support Team

## Re: Parallel period data by selected dates

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.
Highlighted
Member

## Re: Parallel period data by selected dates

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
)
)```

Announcements

#### Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

#### 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?

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

We are super excited for our update this month, as we are releasing two of our top community requests!

#### Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors