The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello all! I am trying to execute a code to show me the value of the previous row in a new column whenever the value of the column "BOM Level" is equal to "NaN", as highlighted in orange in the second image.
Unfortunately I still couldn't find a way to do this in the M language (I'm using Power Query in Excel).
Thank you in advance 🙂
Current worksheet:
Result I'm trying to achieve:
Solved! Go to Solution.
Hi @Anonymous ,
if you're serious about performance with previous rows in PQ, you should use the "Table.PreviousRow.pq"-function, I've posted here: https://www.thebiccountant.com/2018/07/12/fast-and-easy-way-to-reference-previous-or-next-rows-in-power-query-or-power-bi/
But I also have a series about BOM applications that you might be interested in: https://www.thebiccountant.com/2017/05/08/dynamic-bill-of-material-bom-solution-in-excel-and-powerbi/
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
If it is OK to use DAX, you can use this: See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395...
If you need Power Query, use @ImkeF
Hi @Anonymous ,
if you're serious about performance with previous rows in PQ, you should use the "Table.PreviousRow.pq"-function, I've posted here: https://www.thebiccountant.com/2018/07/12/fast-and-easy-way-to-reference-previous-or-next-rows-in-power-query-or-power-bi/
But I also have a series about BOM applications that you might be interested in: https://www.thebiccountant.com/2017/05/08/dynamic-bill-of-material-bom-solution-in-excel-and-powerbi/
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries