cancel
Showing results for
Did you mean:
Frequent Visitor

## Calculate total year, ignoring selected date range

With which measure can I calculate the total of a selected year, ignoring a selected date range?

Explanation: In a orderbook I select a daterange to compare the orders of this year with last year.

But I also need a formula to calculate the total of the orderbook, ignoring the selected date range, but using the selected year.

1 ACCEPTED SOLUTION
Super User

Hi, @haraldjw

I am not sure how your measure looks like, but try something like below.

New measure =
CALCULATE (
FILTER (
[datetable year column] = MAX ( [your selected year] )
)
)

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

2 REPLIES 2
Super User

Hi, @haraldjw

I am not sure how your measure looks like, but try something like below.

New measure =
CALCULATE (
FILTER (
[datetable year column] = MAX ( [your selected year] )
)
)

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

Super User

@haraldjw you may create a seperate measure for each year like below

Vol_2019 = calculate(sum(volume), year=2019)

let me know if you need something else.

Proud to be a Super User!

Announcements

#### The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

#### Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!