If(
CountRows(
Filter(
colRowMonthData,
UnitType = 0
)
) = 0,
Patch(
Objectives,
ForAll(
colRowMonthData As Alpha,
With(
{
_Record:
LookUp(
Objectives,
'Objective ID' = Alpha.'Objective ID'
),
_Alpha: Alpha.Unit = Unit.text
},
{
ID: _Record.ID,
'Result jan': If(
!_Alpha,
Value(Alpha.ResultJan.Text),
Blank()
),
'Result jan t': If(
_Alpha,
Alpha.ResultJan.Text,
Blank()
),
'YTD jan': If(
!_Alpha,
Value(Alpha.YTDJan.Text),
Blank()
),
'YTD jan t': If(
_Alpha,
Alpha.YTDJan.Text,
Blank()
),
'Comment (itobj_jan_comment)': Alpha.ComJan.Text,
Frequency: Alpha.Frequency,
. . . . . . . . . ,
'YTD Colour Jan': Coalesce(
Alpha.colorValueJanYTD,
_Record.'YTD Colour Jan'
),
'YTD Colour Feb': Coalesce(
Alpha.colorValueFebYTD,
_Record.'YTD Colour Feb'
),
. . . . . . . . . ,
'Result Colour Jan': Coalesce(
Alpha.colorValueJanResult,
_Record.'Result Colour Jan'
),
'Result Colour Feb': Coalesce(
Alpha.colorValueFebResult,
_Record.'Result Colour Feb'
)
)
}
)
)
);
. . . . . .
If(
CountRows(Filter(colRowMonthData, UnitType = 0)) = 0,
// Batch patch instead of individual patches
Patch(
Objectives,
ForAll(
colRowMonthData As Alpha,
{
'Objective ID': Alpha.'Objective ID',
'Result jan': If(Alpha.Unit <> Unit.Text, Value(Alpha.ResultJan.Text), Blank()),
//others, the same as you have right now.
Frequency: Alpha.Frequency
}
)
);
//the rest
)
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2