Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
I have this string where I have succesfully grabed, adults, children and infants.
This has been done by this formula by a fellow community member:
List.Sum(List.Transform(List.Skip(Text.Split([metadata],"adults"":")),
(t)=> try Expression.Evaluate(Text.BeforeDelimiter(t,",") ) otherwise Number.From(Splitter.SplitTextByCharacterTransition({"0".."9"},{",","}"})(t){0},"en-US")))
I have tried tweaking the formula so I can grab market_code (the last 3 lines)
List.Sum(List.Transform(List.Skip(Text.Split([metadata],"market_code"":")),
(t)=> try Expression.Evaluate(Text.BeforeDelimiter(t,",") ) otherwise Number.From(Splitter.SplitTextByCharacterTransition({"0".."9"},{",","}"})(t){0},"en-US")))
The formula is returning an error and I have tried a lot of tweaking.
Anybody able to help me?
Solved! Go to Solution.
You can use following formula for everything here. Just replace "market_code by say adults etc.
= try Text.Split(List.RemoveNulls(List.Transform(Text.Split(Text.Remove([metadata],""""),","),(x)=>if Text.Contains(x,"market_code") then x else null)){0},":"){1} otherwise null
You can use following formula for everything here. Just replace "market_code by say adults etc.
= try Text.Split(List.RemoveNulls(List.Transform(Text.Split(Text.Remove([metadata],""""),","),(x)=>if Text.Contains(x,"market_code") then x else null)){0},":"){1} otherwise null
Thank you so much Vijay for your fast response - This is awesome! 🙂
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 10 | |
| 9 | |
| 9 | |
| 8 | |
| 6 |