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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
kimdiep503
Frequent Visitor

Percentage change last year over this year

I have the following formula for percentage change. In the chart below, I only want to show the change for the current year. Is there a way to remove the change value for the previous year? So in this case, remove -15.70% from the table.

 

kimdiep503_0-1695834410517.png

 

 

Percentage Change =
VAR This_YEAR = [Count of Open VER]
VAR LAST_YEAR = Calculate([Count of Open VER], SAMEPERIODLASTYEAR(Calendar_DAX[Date]))
Return Divide(This_YEAR - LAST_YEAR, LAST_YEAR, 0)
2 REPLIES 2
audreygerred
Super User
Super User

If you want to show values for LY (in this case, 2022), but not the % change from 2022 to 2021 I would do the following:

  • Create measure for Count of Open VER if you don't already have one
  • Create measure for Count of Open VER for last year: Count of Open VER LY = CALCULATE([Count of Open VER],SAMEPERIODLASTYEAR('Date'[Date]))
  • Create measure for YoY% (you can use quick meausure): 
    Count of Open VER YoY% = VAR __PREV_YEAR = CALCULATE([Count of Open VER], DATEADD('Date'[Date], -1, YEAR))
    RETURN
        DIVIDE([Count of Open VER] - __PREV_YEAR, __PREV_YEAR)
  • Add filters/slicers for Quarter and Year to the filter pane or the canvas
  • In a table or matrix you can add in Quarter and Year (if you want to display the selections the user has chosen), then add in the measures for Count of Open VER, Count of Open VER LY, and Percentage Change.

audreygerred_1-1695837339736.png

 

 

 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





nirali_arora
Resolver II
Resolver II

You can try the following measure

Conditional Percentage Change =

VAR CurrentYear = YEAR(TODAY()) // Get the current year

VAR Change = [Percentage Change] // Replace with your actual measure for percentage change

RETURN

IF(YEAR([DateColumn]) = CurrentYear, Change, BLANK()

)

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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