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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

New YoY% set as target as column

Hi 

I appreciate if you can please help me. I have a table like attached, where in column Date I have 2 Dates one in 2022 and one in 2021. I can use YoY% by quick measure in Power Point to get the value of YoY% (e.g. 4% for Type A and 32% for Type B). But I'd like to set the target as if YoY% is 7% and 40% respectively. I'd need to check the performance of e.g. cities against the target. Can you please help me how would can I do that? Thank you. 

 

Kind Regards,

DateTypeSalescityColour     
23/06/2022A60738AucklandBlue     
23/06/2022A23910Auckland

Red

     
23/06/2022A188628AucklandBlue     
23/06/2022A40326AucklandOrange     
23/06/2022A101994AucklandBlue     
23/06/2022A70746Auckland

Red

     
23/06/2022A6997.92AucklandBlue     
23/06/2022A140699.44AucklandOrange     
23/06/2022A20726.88AucklandBlue     
23/06/2022A49876.8Auckland

Red

     
23/06/2022B23837.28AucklandBlue     
23/06/2022B185514AucklandOrange     
23/06/2022A100395.6AucklandBlue     
23/06/2022A39973.36Auckland

Red

     
23/06/2022A70584AucklandBlue     
23/06/2022A20785.2AucklandOrange     
23/06/2022A114810AucklandBlue     
23/06/2022A19206AucklandOrange     
23/06/2022A76133.04AucklandBlue     
22/06/2021A180522.6Auckland

Red

     
22/06/2021A13727.4AucklandBlue     
22/06/2021B139073.28AucklandOrange     
22/06/2021B79162.44AucklandBlue     
22/06/2021B139073.28Auckland

Red

     
22/06/2021A79162.44AucklandBlue     
          
1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @Anonymous 

not sure if i fully get you, you may try to create a measure with this:

2022YoY% = 
VAR _2022 =
CALCULATE(
    SUM(TableName[Sales]),
    YEAR(TableName[Date])=2022
)
VAR _2021 =
CALCULATE(
    SUM(TableName[Sales]),
    YEAR(TableName[Date])=2021
)
RETURN
FORMAT(DIVIDE(_2022-_2021, _2022), "0.0%")

i tried and it worked like this:

FreemanZ_0-1671378184781.png

View solution in original post

1 REPLY 1
FreemanZ
Super User
Super User

hi @Anonymous 

not sure if i fully get you, you may try to create a measure with this:

2022YoY% = 
VAR _2022 =
CALCULATE(
    SUM(TableName[Sales]),
    YEAR(TableName[Date])=2022
)
VAR _2021 =
CALCULATE(
    SUM(TableName[Sales]),
    YEAR(TableName[Date])=2021
)
RETURN
FORMAT(DIVIDE(_2022-_2021, _2022), "0.0%")

i tried and it worked like this:

FreemanZ_0-1671378184781.png

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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