Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors