Arithmetic expression has input of type unknown

Hi,

I am facing the above issue when i try to use the following formula

if([_thisrow].[_RowNumber]=1,[_thisrow].[Amount],lookup([_thisrow].[_Rownumber]-1,"Ledger data sender","_RowNumber","Balance")+[_Thisrow].[Debit]-[_Thisrow].[Credit])

ERROR

Arithmetic expression '(ANY(SELECT(Ledger data sender[Balance],([_RowNumber] = ([_thisrow].[_RowNumber]-1))))+[_Thisrow].[Debit])' has inputs of an invalid type 'Unknown'
 
 
 
The above columns are from a table calculating balance of the customer based on debit, credit and value to balance in the previous row.
 
Any insight into what might be causing this? this occurs if i add + or - columns in the formula
0 1 318
1 REPLY 1

This error message typically means the data type of a column, parameter or function result do not match the expected data type.

  • What are the data types of your [Balance], [Debit] and [Credit] columns?
  • I assume you are setting the value of Balance on the current row?

I am often confused as to when to use [_THISROW].  It seems sometimes when it is used where its not needed it causes problems.  I would remove [_THISROW] from all places in  your expression EXCEPT the first argument in your LOOKUP() function.

Top Labels in this Space