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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
JaysYee
Frequent Visitor

Identify items with positive growth year-over-year

I've created a measure based on this post to calculate year-over-year growth.  It works great.  However, now I want to filter the items that have consistent (or positive growth) for every year.  How do I go about creating that slicer/filter?

 

For example:

Item202120222023
A -5%15%
B 10%5%
C 20%-3%

 

Use a slicer with a dropdown that will filter the items with only positive growth for all years.  So if I select some dropdown choice called "Positive Growth," I will only see item B.

 

Thanks!

4 REPLIES 4
v-jialongy-msft
Community Support
Community Support

Hi @JaysYee 

First, you should create two calculate columns:


Positive Growth = CALCULATE(SELECTEDVALUE('Table'[Item]),FILTER(ALL('Table'),'Table'[2021]>=0 && 'Table'[2022]>=0 && 'Table'[2023]>=0 && 'Table'[Item] = EARLIER('Table'[Item])))

 

Negative  Growth = CALCULATE(SELECTEDVALUE('Table'[Item]),FILTER(ALL('Table'),'Table'[2021]<=0 && 'Table'[2022]<=0 && 'Table'[2023]<=0 && 'Table'[Item] = EARLIER('Table'[Item])))

 

Then, create a field  parameter:

vjialongymsft_0-1728610550759.png

 

vjialongymsft_1-1728610569279.png

 

 

Result:

vjialongymsft_2-1728610592056.png

vjialongymsft_3-1728610599085.png

 

 

 

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you!  I should have noted that the table you see is a result of a dynamic measure calculating year-over-year growth.  How can I modify your calculated column to accommodate this measure?  I've copied and pasted the measure I used from a different post:

 

VAR _currentyearpassenger = [Passengers total:]
VAR _currentyear = MAX ( 'Year'[Year] )
VAR _previousyearpassenger = CALCULATE ( [Passengers total:], 'Year'[Year] = _currentyear - 1 )
VAR _YoYGrowth = DIVIDE (_currentyearpassenger - _previousyearpassenger, _previousyearpassenger)

 

RETURN
IF (
HASONEVALUE ( 'Year'[Year] ),
IF (
NOT ISBLANK ( _currentyearpassenger ) && NOT ISBLANK ( _previousyearpassenger ),
_YoYGrowth
)
)

 

Finally, the end table should completely remove the item row if it doesn't fit the filter, not simply hide the name.

 

Thank you again!

 

Hi  @JaysYee 

Can you provide detailed sample pbix file and the results you expect.So that I can help you better. Please remove any sensitive data in advance.

 

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-jialongy-msft , I've attached a sample file with dummy data.  I would like to add a field to the slicer where it would filter for rows where the client has positive YoY growth for all years (e.g., Client C in sample file).  Whether the sub-row (e.g., Sales Person in sample file) has positive growth is not relevant.  In other words, I'm only concerned with client level aggregation.  Thank you so much!

 

I had to upload it to a Google Drive.  Please let me know if you have trouble accessing it.

Google Drive - Sample File 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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