cancel
Showing results for
Did you mean:
Anonymous
Not applicable

## Calculating FULL YEAR SUM value with slicer on month

Hello PowerBI Community,

I'm struggling with calculating sum of FULL YEAR when slicer on Month is applied.

I have a table like that:

Now I would like to have a slicer on MONTH and calculate sum of FULL YEAR, for example:
Slicer Month: 2019-05

Sales Amount: 300

Sales Amount PY: 150

Sales Amount FULL YEAR: 2700 (sum of Sales Amount for 2019 = Sales Amount YTD for 2019-12)

Sales Amount PY FULL YEAR: 2550 (sum of Sales Amount PY = Sales Amount YTD PY for 2019-12)

How can I achieve it?

I tried using ALL() function but then it calculate sum of all years not only for 2019.

Then I wanted to restrict and filter only 2019 data, but how can I get correct year (it should be the year from month slicer)? I can not hardcode it - I want to be able to select for example 2018-07, and so on...

Do you have any ideas?

Thanks,

Best regards,

S. (:

2 REPLIES 2
Super User I

## Re: Calculating FULL YEAR SUM value with slicer on month

@Anonymous  can you paste some data in text form?

Did I answer your question? Mark my post as a solution.
Proud a to be a Datanaut!
Anonymous
Not applicable

## Re: Calculating FULL YEAR SUM value with slicer on month

@vanessafvg

 Year Month Sales Amount Sales Amount PY Sales Amount YTD Sales Amount YTD PY 2018 1 150 200 150 200 2018 2 150 250 300 450 2018 3 250 150 550 600 2018 4 300 200 850 800 2018 5 150 300 1000 1100 2018 6 200 350 1200 1450 2018 7 250 250 1450 1700 2018 8 150 100 1600 1800 2018 9 250 100 1850 1900 2018 10 350 100 2200 2000 2018 11 500 200 2700 2200 2018 12 300 350 3000 2550 2019 1 100 150 100 150 2019 2 200 150 300 300 2019 3 150 250 450 550 2019 4 250 300 700 850 2019 5 300 150 1000 1000 2019 6 200 200 1200 1200 2019 7 100 250 1300 1450 2019 8 100 150 1400 1600 2019 9 200 250 1600 1850 2019 10 250 350 1850 2200 2019 11 350 500 2200 2700 2019 12 500 300 2700 3000

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