LouiseBourgonjon
Frequent Contributor

Finditem公式给出空白,而我期望值

嗨,Anaplan社区,

我在阿纳普兰(Anaplan)有一个奇怪的行为。

我在4个不同的订单项中使用FindItem(站点1,站点2,站点3和站点4)。每个行项目的FindItem公式都相似,它只是指另一个文本形式的订单项来执行FindItem。

The result of the Site 1 formula looks good. However, Site 2, Site 3 and Site 4 return blanks and I don't understand why. Site 1 is working, so why not the other line items??

Can anyone explain what I am doing wrong?

Attached some print screens for the details on formulas and results.

接下来,关于我尝试使用此模块实现的目标的一些信息:

我想将SKU链接到制造SKU的站点。

I have a source module with the SKU-list and the Site-list as dimensions in which volumes are entered by site leads on SKUs. So wherever there is a volume on a SKU/site combination, I know the site produces that SKU.

I want to summarize that information on SKU-level, so for each SKU I want to mention which sites produce it. That is why I use the TEXTLIST formula to list the sites as text and then I break them back to individual sites.

如果有人有更好的主意来实现这一目标,请告诉我。我不确定这是否是正确的方法。

谢谢你!

Kind regards, Louise

2个接受的解决方案

Accepted Solutions
JaredDolich
Moderator

@LouiseBourgonjon

Love the formulas here. My best guess is that you're picking up a space in the parsing. You can check that by looking at the length of the Site 2 text for instance. If you're all good on the parsing then make sure the list item is in the list and spelled correctly without any special characters.

Just some ideas.


Jared Dolich

View solution in original post

rob_marshall
Moderator

@LouiseBourgonjon

In that post I sent you, did you read down to where I explained why not to use TextList() and how to get around it? It starts with...

2021-12-16_07-35-52.png

Rob

View solution in original post

10个答复10
JaredDolich
Moderator

@LouiseBourgonjon

Love the formulas here. My best guess is that you're picking up a space in the parsing. You can check that by looking at the length of the Site 2 text for instance. If you're all good on the parsing then make sure the list item is in the list and spelled correctly without any special characters.

Just some ideas.


Jared Dolich
LouiseBourgonjon
Frequent Contributor

@JaredDolich, thank you for your quick response.

You were right, looking at the length of the string revealed that it was taking into account spaces.

Change the site x (text) formulas to starting position "+2" instead of "+1" and the length from "-1" to "-2" did the trick!

Thank you for your help!

MarkWarren
专家

"I want to summarize that information on SKU-level, so for each SKU I want to mention which sites produce it."

更好的方法是拥有一个布尔值,其中源模块中的卷> 0。它将显示每个SKU的所有站点,而不是将其限制为4。旋转视图,因此您将SKU的行作为列在行和站点上。


This use of textlist and subsequent text manipulation will have a large performance cost.

rob_marshall
Moderator

@LouiseBourgonjon

我可以强调什么@MarkWarrenstated about the use of TextList(). TextList() is evil on performance and there is a reason why we have a rule dedicated to it (2.02-11).

Also, you might want to check out this thread on how to get around it....

https://community.anaplan.com/t5/Anaplan-Platform/Lookup-Sum-and-Textlist-Cheat-Sheet/td-p/53085

Rob

LouiseBourgonjon
Frequent Contributor

Hi@MarkWarren,

感谢您的建议。
I know which SKU is produced by which sites, I have this information in a module with SKUs list as a dimension and Sites-list as a dimension.

我想做的是将这些信息移至仅具有SKU作为维度的模块中。因此,我想将网站带入订单项。通常,SKU仅在一个站点中产生。在多个站点中生产它的例外很少,然后我只需要一个布尔式订单项标记,它是一个多站点来源的SKU。

I don't see how I could use the SUM and boolean trick to accomplish this...

rob_marshall
Moderator

@LouiseBourgonjon

Take a look at the post above, it explains it for you.

LouiseBourgonjon
Frequent Contributor

hi@rob_marshall,

I took a look at that cheat sheet post, but I don't think I understand how I get around the use of textlist.

I use the textlist as is explained in the post, this gives me all sites where the SKU is produced in a text-formatted line item, for each SKU in my target module. This is what I need. I then use finditem to split the text value into multiple text values if the SKU would be produced in more than one site.

我不知道我可以用或LOOKU求和P to do the job.

Would appreciate any help!

rob_marshall
Moderator

@LouiseBourgonjon

In that post I sent you, did you read down to where I explained why not to use TextList() and how to get around it? It starts with...

2021-12-16_07-35-52.png

Rob

LouiseBourgonjon
Frequent Contributor

Hi Rob,

Oh, now I see, I did not read through to the bottom initially.

It took me some time to "see the light", but now I figured out! Thank you so much!

I am now using the firstnonblank to show the first site that makes the SKU. Next to that I have added a number line item in my source module and I use a SUM in my target to check how many sites produce the SKU. If that number is higher than 1, I flag that SKU as a multi-sourced SKU. Attached you can see the comparison finditem vs textlist. I am now only showing the first site and indicating if there are multiple. which is sufficient.

I will now remove the textlist and the finditems to save space:slightly_smiling_face:

Thank you for your help!