Forum Discussion
Replace Date Values in a single column
- Anonymous1 year ago
Hi,
Thanks for the solution michaelu1 offered, and i want to offer some more information for user to refer to.
hello ErickReris , you can refer to the following sample.Sample data
Create a calculated column.
Column = VAR a = [Initial Forecast] & "|" & [Forecast Delivery] & "|" & [Delivery Date] & "|" & [Entry Date] VAR b = ADDCOLUMNS ( GENERATESERIES ( 1, PATHLENGTH ( a ) ), "Item", PATHITEM ( a, [Value] ) ) VAR c = MINX ( FILTER ( b, [Item] <> BLANK () ), [Value] ) RETURN DATEVALUE ( MINX ( FILTER ( b, [Value] = c ), [Item] ) )Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I'm not sure exactly what you want, but assuming that the columns are null until the data gets populated, it seems you can use variables and then use a switch:
VAR _InitialForecast = [Initial Forecast]
VAR _TMSForecast = [TMS Forecast]
VAR _DeliveryDate = [Delivery Date]
VAR _EntryDate = [Entry Date]
VAR _Switch =
Switch(
True(),
ISBLANK(_TMSForecast), _InitialForecast,
ISBLANK(_DeliveryDate ), _TMSForecast,
ISBLANK(_EntryDate ), _DeliveryDate ,
_EntryDate
)
RETURN
_Switch
I wrote that freehand, but you should get the idea.