2016-07-20 17 views
0

2桁の数字で始まり、次に文字で始まる列があります。 これを数字ビットと文字ビットに分割したいと思います。電力クエリ - 分割列エラー値はnullにはできません

私は私の列をチェック倍

= Table.SplitColumn(#"Duplicated Column","FamilyCode - Copy",Splitter.SplitTextByPositions({0, 2}, false),{"FamilyCode - Copy.1", "FamilyCode - Copy.2"}) 

I get an error: 

> Unexpected error: Value cannot be null. 
Parameter name: source 
Details: 
    Microsoft.Mashup.Evaluator.Interface.ErrorException: Value cannot be null. 
Parameter name: source ---> Microsoft.Mashup.Evaluator.Interface.ErrorException: Value cannot be null. 
Parameter name: source ---> System.ArgumentNullException: Value cannot be null. 
Parameter name: source 
    at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate) 
    at Microsoft.Mashup.Engine1.Library.Odbc.OdbcQuery.AddColumns(ColumnsConstructor columnGenerator) 
    at Microsoft.Mashup.Engine1.Runtime.OptimizingQueryVisitor.VisitQuery(Query query, Func`2 operation) 
    at Microsoft.Mashup.Engine1.Runtime.OptimizingQueryVisitor.VisitQuery(Query query) 
    at Microsoft.Mashup.Engine1.Runtime.OptimizingQueryVisitor.VisitQuery(Query query, Func`2 operation) 
    at Microsoft.Mashup.Engine1.Runtime.OptimizingQueryVisitor.VisitQuery(Query query) 
    at Microsoft.Mashup.Engine1.Runtime.OptimizingQueryVisitor.VisitQuery(Query query, Func`2 operation) 
    at Microsoft.Mashup.Engine1.Runtime.OptimizingQueryVisitor.VisitQuery(Query query) 
    at Microsoft.Mashup.Engine1.Runtime.OptimizingQueryVisitor.VisitQuery(Query query, Func`2 operation) 
    at Microsoft.Mashup.Engine1.Runtime.OptimizingQueryVisitor.VisitQuery(Query query) 
    at Microsoft.Mashup.Engine1.Runtime.OptimizingQueryVisitor.Optimize(Query query) 
    at Microsoft.Mashup.Engine1.Language.Query.QueryTableValue.get_OptimizedQuery() 
    at Microsoft.Mashup.Engine1.Language.Query.QueryTableValue.GetEnumerator() 
    at Microsoft.Mashup.Engine1.Runtime.TableValue.Microsoft.Mashup.Engine.Interface.ITableValue.GetEnumerator() 
    at Microsoft.Mashup.Evaluator.SimpleDocumentEvaluator.ValuePreviewValueSource.TableValuePreviewValueSource.SerializeRows(Int32 count) 
    at Microsoft.Mashup.Evaluator.SimpleDocumentEvaluator.ValuePreviewValueSource.TableValuePreviewValueSource.get_SmallValue() 
    at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.<>c__DisplayClass5.<RunStub>b__3() 
    at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Action action) 
    --- End of inner exception stack trace --- 
    at Microsoft.Mashup.Evaluator.EvaluationHost.<>c__DisplayClass7.<TryReportException>b__6() 
    at Microsoft.Mashup.Common.SafeExceptions.IgnoreSafeExceptions(IHostTrace trace, Action action) 
    at Microsoft.Mashup.Evaluator.EvaluationHost.TryReportException(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Exception exception) 
    at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Action action) 
    at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.RunStub(IEngineHost engineHost, IMessageChannel channel, Func`1 getPreviewValueSource) 
    at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.<>c__DisplayClass32`1.<OnBeginGetResult>b__2f() 
    at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Action action) 
    at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetResult[T](IMessageChannel channel, BeginGetResultMessage message, Action`1 action) 
    at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetPreviewValueSource(IMessageChannel channel, BeginGetPreviewValueSourceMessage message) 
    at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message) 
    at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message) 
    at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message) 
    at Microsoft.Mashup.Evaluator.ChannelMessenger.OnMessageWithUnknownChannel(IMessageChannel baseChannel, MessageWithUnknownChannel messageWithUnknownChannel) 
    at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message) 
    at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message) 
    at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message) 
    at Microsoft.Mashup.Evaluator.EvaluationHost.Run() 
    at Microsoft.Mashup.Container.EvaluationContainerMain.Run(Object args) 
    at Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass15.<CreateAction>b__14(Object o) 
    at Microsoft.Mashup.Container.EvaluationContainerMain.SafeRun(String[] args) 
    at Microsoft.Mashup.Container.EvaluationContainerMain.Main(String[] args) 
    --- End of inner exception stack trace --- 
    at Microsoft.Mashup.Evaluator.EvaluationHost.OnException(IEngineHost engineHost, IMessageChannel channel, ExceptionMessage message) 
    at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message) 
    at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message) 
    at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message) 
    at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message) 
    at Microsoft.Mashup.Evaluator.Interface.IMessageChannelExtensions.WaitFor[T](IMessageChannel channel) 
    at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.WaitFor(Func`1 condition, Boolean disposing) 
    at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.get_SmallValue() 
    at Microsoft.Mashup.Host.Document.Analysis.PackageDocumentAnalysisInfo.PackagePartitionAnalysisInfo.SetPreviewValue(EvaluationResult2`1 result, Func`1 getStaleSince, Func`1 getSampled 

、各行は以下の2つの文字を含むエントリ、無空行とない行(10に対するすべての分5)

誰を有します何か案が?

エクセル2016

おかげ

答えて

1

ここで(何もすることはできません)、各文字列の先頭にあるどのように多くの桁数を気にしないより堅牢な方法です:

あなたの重複列のステップを削除します。

は、次にケンPULSへ

= Text.End (Text.From ([FamilyCode]) , Text.Length([FamilyCode]) - Text.Length ([FamilyCode Number]))

Hatの先端[FamilyCode]のテキスト部分を取得するために、その後、別のカスタム列を追加FamilyCode数

= Text.SplitAny(Text.Lower ([FamilyCode]) , Text.Combine ({"a".."z"})){0})

という名前のカスタム列を追加する方これに関するブログ:

http://www.excelguru.ca/blog/2015/12/02/separate-values-and-text-part-2/

関連する問題