cancel
Showing results for
Did you mean:
Frequent Visitor

## How to filter one data and see two periods on columns?

Hello.

I have two slicers, one with year and other with month (both required).

The idea is: When I select year and month, one colunm return the period selected and other colunm return the values from last december before selected period.

Example:

IF I selected May 2018, columns return May 2018 and December 2017;

If I select April 2016, return April 2016 and December 2015.

The actual values it´s ok.

But, when I select the period, the column Exposition Last December doesn´t work.

Can someone help me?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User

## Re: How to filter one data and see two periods on columns?

Hi @Meirieli,

I'm assuming you want MTD values:

Use something like this:

```Exposition Last December =
CALCULATE (
SUM ( Table[Value] );
FILTER (
ALL ( Table[Date] );
MONTH ( Table[Date] ) = 12
&& YEAR ( Table[Date] ) = ( YEAR ( MAX ( Table[Date] ) ) -1)
)
)```

Any questions please tell me

Regards

MFelix

Regards

MFelix

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

2 REPLIES 2
Highlighted
Super User

## Re: How to filter one data and see two periods on columns?

Hi @Meirieli,

I'm assuming you want MTD values:

Use something like this:

```Exposition Last December =
CALCULATE (
SUM ( Table[Value] );
FILTER (
ALL ( Table[Date] );
MONTH ( Table[Date] ) = 12
&& YEAR ( Table[Date] ) = ( YEAR ( MAX ( Table[Date] ) ) -1)
)
)```

Any questions please tell me

Regards

MFelix

Regards

MFelix

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Frequent Visitor

## Re: How to filter one data and see two periods on columns?

@MFelix, it´s just I need! Tks! \o/

Announcements

#### New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

#### Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

#### Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)