Sum Error - Mismatch

Highlighted
New Contributor

Sum Error - Mismatch

Hi,

 

I am attempting to bring in the sum of one line item from one module to the next and getting the error:

 

Data type mismatch: format other than LIST or DATE being referenced as a relation

 

Here is the formula that is failing:

 

kpeters_0-1603485692896.png

and the referenced module:

 

kpeters_1-1603485736869.png

 

Thanks!

 

 

 

6 REPLIES 6
Highlighted
Frequent Contributor

Re: Sum Error - Mismatch

Hi @kpeters 

 

By the looks of it , I think you should be creating a line item which finds the list item using Text formatted like item Cust.Mkt ID . 

Then you can use this line item in SUM to bring the SUM by the list . 

 

Hope this helps . 

 

Thank you,

Puneeth HP 

Highlighted
Frequent Contributor

Re: Sum Error - Mismatch

@kpeters Looks like in the Source module "D11 Journal Manual Entries", you are trying to group "Text" formatted line item " Cust.Mkt ID". If Customer is one of the List in the model and MKT ID is a property or code of Customer List, you can use "FINDITEM()" to find the List Member in a Customer List formatted line item and refer that in SUM:

 

Hope this helps.

 

AB

Highlighted
Regular Contributor

Re: Sum Error - Mismatch

Hi @kpeters 

The reason for this error ("Data type mismatch: format other than LIST or DATE being referenced as a relation") , the line item using which you are trying to sum is a text formatted rather date or list.

In order to sum here:

1. Create another lineitem name it  Cust.Mktlist and  format it by Cust.Mkt list 

2. Formula for Cust.Mktlist :- Finditem('Cust.Mkt',Cust.Mkt ID)

3. Now use this lineitem "Cust.Mkt list" in the sum formula.

 

Hope this helps.

~ABhi

Highlighted
Super Contributor

Re: Sum Error - Mismatch

@kpeters 

The error is generated because you are trying to use a text formatted line item to map between lists.

SUM only works when you are able to use a relationship between two lists and a list formatted line item is used in the formula. 

 

Create an additional line item and format this as the target list to be used in the SUM. Use the code in a FINDITEM function to pull through the relevant list item.

=FINDITEM(Cust.Mkt (this is referencing the list whose ID you are pulling through), Cust.Mkt ID)

If you use this in your SUM formula you should not generate the same error.

Highlighted
New Contributor

Re: Sum Error - Mismatch

Should I be adding the Finditem to both modules and then using the Sum function?

 

Thanks!

Highlighted
Regular Contributor

Re: Sum Error - Mismatch

@kpeters,

 

You just need to have list-formatted sum criteria in your "D11 Manual ** " Module.

 

https://help.anaplan.com/anapedia/Content/Calculation_Functions/All/SUM.html

 

Thanks,

Sandeep