cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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:

PBI.PNG

 

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

 

YearMonthSales AmountSales Amount PYSales Amount YTDSales Amount YTD PY
20181150200150200
20182150250300450
20183250150550600
20184300200850800
2018515030010001100
2018620035012001450
2018725025014501700
2018815010016001800
2018925010018501900
20181035010022002000
20181150020027002200
20181230035030002550
20191100150100150
20192200150300300
20193150250450550
20194250300700850
2019530015010001000
2019620020012001200
2019710025013001450
2019810015014001600
2019920025016001850
20191025035018502200
20191135050022002700
20191250030027003000

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

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!

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?

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

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

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors