Forum Discussion
Calculate median from calculated column
- 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])
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])
- Yeztrom4 years ago
Helper I
Thanks,
The solution was:
VAR _VW_Prices_Mode_Clear =SUMMARIZE(_VW_Prices_Mode,[master_product_id],[related year_week],"Mode",MEDIANX(FILTER(_VW_Prices_Mode, [master_product_id] = EARLIER([master_product_id]) && [related year_week] = EARLIER([related year_week]) ), [product_current_price]))