Forum Discussion

Yeztrom's avatar
Yeztrom
Icon for Helper I rankHelper I
4 years ago
Solved

Calculate median from calculated column

Hi,   I have de next calculated table.     That table is generated with the next measure.   VAR _VW_Prices_Mode = FILTER(             _VW_Prices_Mode_Retalers_No_Model,              [...
  • amitchandak's avatar
    4 years ago

    Yeztrom , This will take complete column, Try like

    If needed use add columns to add the below column

     

    VAR _VW_Prices_Mode_Clear =
    SUMMARIZE(
    _VW_Prices_Mode,
    [master_product_id],
    [related year_week],
    "price",[product_current_price]
    )

     

    New column = MEDIANX(filter(Table, [master_product_id] = earlier([master_product_id]) && [related year_week] = earlier([related year_week]) ), [Price])

     

    or

     

    New column = MEDIANX(filter(Table,  [related year_week] = earlier([related year_week]) ), [Price])