cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ilcaa722
Frequent Visitor

i want a Blank else in List.Accumulate( IF...

 

= Table.AddColumn(#"Inserted Text Before Delimiter","FindReplace", 
each List.Accumulate(List.Numbers(0, Table.RowCount(replaceTable)), 
[Description],
(state, current) => 
if Text.Contains(Text.Lower(state) , replaceTable[contains]{current}) then replaceTable[replace]{current} else  "" ))

 

 

this doesnt work cause my else statement is saying "" blank... it works if I add a command with state or just "state"

 

but i dont want to return the state, i want to return a blank... how can i. thank you

 

3 REPLIES 3
tackytechtom
Super User
Super User

@ilcaa722 ,

 

Does it work for you if you substitute the "" with null instead?

 

Let me know 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




I tried to end with Text.Length(state)*0 but other errors....

does not work. error is:

cannot convert the value null to type logical

 

it seems 'state' must be part of the List.Accumulate 2 arguement and modifying it has limits

Helpful resources

Announcements
Exciting changes

Power BI Community Changes

Check out the changes to the Power BI Community announced at Build.

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Kudo Data Story carousel

Data Stories Gallery

Visit our Data Stories Gallery and give kudos to your favorite Data Stories.

Top Solution Authors
Top Kudoed Authors