Forum Discussion
Formulae to copy/paste dates based on conditions
- 2 years ago
Hi Fab117 ,
yes, you applied the code to each row of the table instead of just to the table itself.
Easiest would be to:1) Create a new query
2) Copy my query code into the advanced editor (replacing everything that exists there so far)
3) Replace the content of the first "Source"-step by a reference to your query
If you run into problems with that, please watch my video here: http://community.powerbi.com/t5/Webinars-and-Video-Gallery/Power-BI-Forum-Help-How-to-integrate-M-code-into-your-existing/m-p/179314
Fab117 you are trying to add custom column - bad decision, don't do that. Lets create new query. Suppose you loaded your original table into PQ. The name of the query is Tasks-TasBaselines - Projects (can be anything).
Create a new blank query New Source -> Other Sources -> Blank Query.
On your left find Advanced Editor and step on it. Advanced Editor window shows up.
Replace everthing inside with the code I gave you while your_table string should be replaced by
#"Tasks-TasBaselines - Projects" (see image). Press Done.
Big thank you for the time invetested on my issue.
Finally, I followed the 1st answer and was able to solve my issue