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.
Hi,
I have a requirement to split a string and sum the values. Please find the below string as an example of my requirement. The string is a dynamic string. So we need a solution in as dynamic way.
Example:
2|xxx|3~4|xxx|5~6|xxx|7~8|xxx|9
From my example, our expected answer is 20(2+4+6+8)
I really appreciate any help you can provide.🙄
In a custom column, put following (replace Data with your column name)
List.Sum(List.Transform(Text.Split([Data],"~"), (x)=>Number.From(Text.BeforeDelimiter(x,"|"))))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.