Forum Discussion

Lakshmi20's avatar
Lakshmi20
New Member
3 years ago
Solved

undefined

How to get "Y to y growth" Colum individual growth percentage

Please anyone help me

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Lakshmi20 ,

     

    Based on my research, I think [total sales] is a measure.

    Here's my solution.

    Sample data is as follows.

    [total sales] is a measure as

    total sales = SUM('Table'[sales])

    Then you can create a measure for returning the previous year's sales.

    previous sales = CALCULATE([total sales],FILTER(ALLSELECTED('Table'),YEAR([date])=YEAR(MAX('Table'[date]))-1))

    Then the [y to y growth] is

    y to y growth = DIVIDE([total sales]-[previous sales],[previous sales])

                                                                                                                                                             

    Best Regards,

    Stephen Tao

     

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

     

     

2 Replies

  • hi Lakshmi20 

    Info insufficient. Anyway, try like:

    YoY% =
    VAR salespre =
    CALCULATE(
    [total sales],
    TableName[Year]=MAX(TableName[Year])-1
    )
    RETURN
    DIVIDE([total sales], salespre)-1

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Lakshmi20 ,

     

    Based on my research, I think [total sales] is a measure.

    Here's my solution.

    Sample data is as follows.

    [total sales] is a measure as

    total sales = SUM('Table'[sales])

    Then you can create a measure for returning the previous year's sales.

    previous sales = CALCULATE([total sales],FILTER(ALLSELECTED('Table'),YEAR([date])=YEAR(MAX('Table'[date]))-1))

    Then the [y to y growth] is

    y to y growth = DIVIDE([total sales]-[previous sales],[previous sales])

                                                                                                                                                             

    Best Regards,

    Stephen Tao

     

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