Forum Discussion

jkbyerly's avatar
jkbyerly
New Member
9 years ago
Solved

Trouble comparing values in the same column

My data source has the first three columns shown below.  I can't figure out how to create the two columns on the right.  Essentially what I'm trying to do is create a price ratio for each month.  'St...
  • Vvelarde's avatar
    9 years ago

    jkbyerly

     

    Hi, create the calculated columns:

     

    1:  Standard Column

     

    Standard =
    CALCULATE (
        VALUES ( Table1[Price] ),
        FILTER ( ALLEXCEPT ( Table1, Table1[Month] ), Table1[Group] = "Standard" )
    )

    2. % to Standard Column

     

    % To Standard = Divide(Table1[Price],Table1[Standard])

    Ready.