Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Marshmallow
Helper I
Helper I

YOY growth on a particular period when another period is selected

Hi,

I am trying to do sum of a category of a certain period when another period is selected. So I have a date table. below is a sample table

 

ProductApril 2022September 2024November 2024

Food

     - Noodle

     - Rice

519

254

265

719

617

127

679

579

100

Footwear

    - Shoes

    - Thong

890

600

290

900

600

300

750

350

400

Other

    - Misclenaous

    - Shirt

600

350

250

808

408

400

900

200

700

 

I am trying to do YOY Growth in each product category since Apr 22 for each category including when other period is selected (e.g. Sept 2024, Nov 2024 and so on as more periods are added).

 

So the result for November 2024 would be:

Food - YOY Growth since Apr 22 is --> 30%

Footwear - YOY Growth since Apr 22 is --> -16%

Other - YOY Growth since Apr 22 is --> 33%

 

And the YOY growth since Apr will change based on any filters are selected, e.g. period, product category.

 

Can someone please help as I jsut cant seem to get the last bit correct?

2 ACCEPTED SOLUTIONS

hi @Marshmallow 

 

Check this measure

Measure for April = CALCULATE(SUM(Lumix[Clicks]),FILTER(ALL('Calendar'),MONTH('Calendar'[Date])=&& YEAR('Calendar'[Date])=2022))
 
Uzi2019_0-1737033316249.png

 

 

Uzi2019_1-1737033333058.png

 

 

after changing date filter Number is still constant.

 

I hope I answered your question!

 

 
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

View solution in original post

Hi @Marshmallow 

 

You can write it without Filter().

Measure for April = CALCULATE(SUM('Sales'),MONTH('Calendar'[Date])=4&& YEAR('Calendar'[Date])=2022)
 
Try this also... you may get the same result.
 
I hope I answered your question!
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

View solution in original post

6 REPLIES 6
Uzi2019
Super User
Super User

Hi @Marshmallow 

 

Still your query is not clear. please provide proper expected output in a form of table what do you want to campare and with sample number. 

 

use excel data or screenshot for better representing.

 

It helps other users to answer you question faster.

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Hi there

below is the screenshot of the sample

Marshmallow_1-1737031939974.png

 

 

As you can see, when the PERIOD filter is not selected (PERIOD: ALL), the total Measure 2 is 10,579 - which is the total for April 2022 which is the result what I want regardless of any PERIOD selected.

 

At the moment, if I change PERIOD to September 2024, the Measure 2 becomes Blank instead of staying as 10,579.

Marshmallow_3-1737032157622.png

 

I need a calculation where Measure 2 remains as the Total for April 2022 regardless of the filters being selected.

 

Hopefully this makes it more clearer and someone can help me.

hi @Marshmallow 

 

Check this measure

Measure for April = CALCULATE(SUM(Lumix[Clicks]),FILTER(ALL('Calendar'),MONTH('Calendar'[Date])=&& YEAR('Calendar'[Date])=2022))
 
Uzi2019_0-1737033316249.png

 

 

Uzi2019_1-1737033333058.png

 

 

after changing date filter Number is still constant.

 

I hope I answered your question!

 

 
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

hi @Marshmallow 

 

Check this measure

Measure for April = CALCULATE(SUM(Lumix[Clicks]),FILTER(ALL('Calendar'),MONTH('Calendar'[Date])=&& YEAR('Calendar'[Date])=2022))
 
Uzi2019_0-1737033316249.png

 

 

Uzi2019_1-1737033333058.png

 

 

after changing date filter Number is still constant.

 

I hope I answered your question!

 

 
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Hi @Marshmallow 

 

You can write it without Filter().

Measure for April = CALCULATE(SUM('Sales'),MONTH('Calendar'[Date])=4&& YEAR('Calendar'[Date])=2022)
 
Try this also... you may get the same result.
 
I hope I answered your question!
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Thank you, it works!! 😊

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.