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
ChihiroWa
Regular Visitor

Calculate YoY

Hi! I hope my words make sense although I am not IT person and my first language is not English.

 

I am trying to create a measure to calculate YoY, but I goes wrong.

What I want to do is:When a slicer is chosen 'CY2023', a card shows YoY % of production volume(CY2022 vs CY2023). This slicer has multiple choises through CY2000 to CY 2023, so YOY must be change by a chosen CY.

ChihiroWa_1-1686530967615.png

 

TableA is like this; production volume through 2000 to 2023

NameSub nameCYVolumeCY(yyyy)
AxxxCY20221002022
AyyyCY20232002023
BxxxCY20003002000
BzzzCY20014002001

 

 

 

What I tried:

  *Sorry for including Japanese language

1. Create a measure to calculate prior year  →Succeeded

ChihiroWa_2-1686531089031.png

 

2.Create a measure to calculate volume of prior year  → Go wrong

   Volume(PriorYear) = CALCULATE(SUM('TableA'[Volume]),ALL(('TableA'),'TableA'[CY(yyyy)]='Measure'[PriorYear]

Error: 

Function 'placeholder' is used in a true/false expression used as a filter expression for a table. This is not allowed.

ChihiroWa_3-1686531237450.png

 

Sorry for my bad English.

I hope someone heplp me!

 

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Please find attached my PBi file.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

Please find attached my PBi file.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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!

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.