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.
Hello,
With substring function i changed text from "6x40HQ,1x20" to "6*76+1*33". Now I would like to execute this "6*76+1*33" as a formula.
Best Regards,
Lukasz Koper
Solved! Go to Solution.
Hi @LukaszKoper ,
Try this one for a custom column:
Expression.Evaluate(Text.Replace([Column1], """", ""))
Hi @LukaszKoper
if the above posts help, please kindly mark it as a solution to help others find it more quickly. If not, please kindly elaborate more. thanks!
@LukaszKoper , refer if this can help
https://docs.microsoft.com/en-us/powerquery-m/expression-evaluate
Hi @LukaszKoper ,
Try this one for a custom column:
Expression.Evaluate(Text.Replace([Column1], """", ""))
To elaborate I have a column (container-typ) imported from excel that has values like:
20
40
40HQ
40HC
4x40HQ,1x20
Those are types of containers and f.e container type 20 has volume of 33 m^3, 40HQ has volume of 76m^3
In DAX I use this querry
SUBSTITUTE (SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE( SUBSTITUTE ([Container-typ], "x", "*"),"20", 33),"40HQ",76),"40HC",76),"40",67),",","+"),"LCL",""),"DDP","")
to change container type to the volume it has and change expresions like 4x40HQ,1x20 to somethig that looks like formula 4*76+1*33.
In Custom Column I would have to use powerquerry-m. My question is how to change DAX querry to powerquerry-m to get the same effect and how to then run it like a formula?
Ok got it Thank You @camargos88 !
I used custom columns, first with this querry
then this querry
=Expression.Evaluate(Text.Replace([Volume],"""",""))
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.
User | Count |
---|---|
106 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |