Template Expressions Error

I want that if [team name] and [channel] are equal, then their total value should be calculated. If both are equal. in current date.



DATE



TEAM NAME



CHANNEL



TOTAL QTY



HANDOVER TO



<<START:FILTER(GroupForReports, [DATE] = TODAY())>><<[DATE]>>



<<[TEAM NAME]>>



<<[CHANNEL]>>



<<SUM(SELECT(GroupForReports[TOTAL QTY], AND([DATE] = TODAY(), [CHANNEL] = [_ThisRow].[CHANNEL])))>>



<<[HANDOVER TO]>><>

Assuming your doing this as an additonal column

<<IF(
   AND(
      [Team Name]=[Channel],
      [Date]=Today()
   ),
[Team Name]=[Channel],
""
)>> 

Simon, 1minManager.com

Hi @1minManager

Run task “New step Task - 1”

[CHANNEL] columns is Enum types and [team name] column is enumlist types.

  • Error 1 : ‘Process for New bot - 1’ task ‘New step Task - 1’ Body template. Expression ‘IF( AND( [Team Name]=[Channel], [Date]=Today() ),[Team Name]=[Channel],“”)’ is invalid due to: Cannot compare List with Text in ([Team Name] = [Channel]).
  • Error 2 : The document body is empty
<<IF(
   AND(
      IN([Team Name],[Channel]),
      [Date]=Today()
   ),
[Team Name]=[Channel],
""
)>>

Run task “New step Task - 1”

  • Error 1 : ‘Process for New bot - 1’ task ‘New step Task - 1’ Body template. Expression ‘IF( AND( IN([Team Name],[Channel]), [Date]=Today() ),[Team Name]=[Channel],“”)’ is invalid due to: Parameter 2 of function IN is of the wrong type.
  • Error 2 : The document body is empty
<<IF(
   AND(
      IN([Channel],[Team Name]),
      [Date]=Today()
   ),
[Team Name]=[Channel],
""
)>> 

[CHANNEL] columns is Enum types and [team name] column is enumlist types.

Run task “New step Task - 1”

  • Error 1 : ‘Process for New bot - 1’ task ‘New step Task - 1’ Body template. Expression ‘IF( AND( IN([Channel],[Team Name]), [Date]=Today() ),[Team Name]=[Channel],“”)’ is invalid due to: Cannot compare List with Text in ([Team Name] = [Channel]).
  • Error 2 : The document body is empty

You need to explain “…then their total value should be calculated…” since [Team Name]=[Channel] is not allowed if one is a list and the other isn’t.

Virtual Column name is [DataPeformChannel]. Formula below

CONCATENATE([DATE],[channel],[TEAM NAME],
    SUM(SELECT(
        Photos[TOTAL PHOTO],
        AND(
            [channel] = [_THISROW].[channel],
            COUNT(INTERSECT([team name], [_THISROW].[team name]))>0,
            [DATE] = TODAY()
        )
    ))
)

grouping conditions at the slice:

[_ROWNUMBER] = ANY(ORDERBY(FILTER(
    "Photos",
    AND(
        [channel] = [_THISROW].[channel],
        COUNT(INTERSECT([team name], [_THISROW].[team name]))>0,
        [DATE] = TODAY()
    )
    ),
    [_ROWNUMBER]
    )
)

Hi @1minManager Please help me.