Forum Discussion
Stock Portfolio Control ! Can i use the column that I am creating on the same calculation?
someone? I just start to learn about custom functions and while loops... but I still couldnt figure out the problem...
Hi felipecarvalho ,
Loop calculation is not supported in dax,we only have workarounds for plus and minus calculations,not including multiplication and division.So in your requirement,if the column "Individual Cost" contains the same value,we may have a workaround to do the loop.
My suggestion is to finish the loop calculation outside desktop first then load the model to desktop to do further analyzing.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
- felipecarvalho5 years ago
Helper I
First of all thanks for your reply!
I am not trying to solve this I'm powerBI , but in PowerQuery.
In order to automate the entire process I need to solve this with M code.I am finding it very difficult but I think there is a way.
One hint was this post about recursive functionalities:https://community.powerbi.com/t5/Community-Blog/Fun-with-Graphing-in-Power-BI-Part-SQRT-POWER-SQRT-8-2-POWER/ba-p/385953
but so far I am still in a dead-end...- v-kelly-msft5 years ago
Community Support
Hi felipecarvalho ,
Sorry I didnt notice it.
I found a vedio teaching how to do loop in power query which may help:
https://www.youtube.com/watch?v=mXbjoSg9ldo
Let me know if you are still frustrated.
Best Regards,
KellyDid I answer your question? Mark my reply as a solution!
- v-kelly-msft5 years ago
Community Support
Hi felipecarvalho ,
Is your issue solved now?
Best Regards,
KellyDid I answer your question? Mark my reply as a solution!
- felipecarvalho5 years ago
Helper I
Thanks for your help, but I still could not make work. The results from the loops are not what I expected..
I have too many variables that iterate ... the examples are usually very simple and I still can make the connection ...