Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I am attempting to write a tool for projecting cost over a series of months for a range of line items, where the item type determines how much cost is taken in which particular month. Each line could have its own start date, end date and duration (using integer months).
I want to make the tool as future-proof and user friendly as possible, e.g. new formulas for cost treatment can be created or modified without working within the power query module. So far I've tried creating a table with basic algebra typed out for the current methods with the intention of using Text.Replace to push in the value to per line for variables "s" and "d" within the power query.
= Table.ReplaceValue( PreviousStep , "d", each [CASH OUT MONTHS], Replacer.ReplaceText, {"% TOTAL COST", "MONTH OF IMPACT"})
This works to get a string like "1/10" in the case of cost treatment C, or "4+10/2" for the month of impact for cost treatment A, (using s = 4 and d = 10 as an example) but then I have no way I know of to compute the text formulae within power query to return results of 0.1 and 9 as values.
Does anyone know of a way to execute the formula, or a suggestion of a different approach?
Solved! Go to Solution.
Expression.Evaluate can do this job.
Perfect, thank you so much!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.