Forum Discussion
Adding conditional column with either value from other column OR the value from the row above
Try not to use EARLIER. Use variables instead.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Hi, thank you for the swift reaction. Variables is competely new to me, so I really hope you can help me a little further. I've created a small dataset in an CSV-file and made it available from my Dropbox account:
I've created an Excelsheet with the desired results:
If I have the extra columns, in my Dashboard I can filter on rows that have in the column 'Stock_after_booking' a value < 0. By doing this I isolate all my project which have a potential problem and I also see which Purchase Orders I can try to influence in order to solve the problem.
I really hope you can help me with this, thanks in advance for your reply!
Kind regards, Daniel
- lbendlin2 years agoSuper User
Thank you for the sample data. Looking at it I don't see any fields that would be impacted by user filter choices. As such the new columns could be added in Power Query instead of DAX. Do you have any preferences?
- DanielB_NL2 years agoHelper I
Hi lbendlin, PowerQuery would be fine as wel!! I don't have any preferences and am already very happy that you are putting your time and effort in it
- DanielB_NL2 years agoHelper I
Hi lbendlin, I've extended the dataset with 2 more article numbers: the idea that the stock mutations over time are evaluated per article number, but after looking at the sample data again I wasn't sure that this was clear with the limited data sample. I think it is more clear this way.
- lbendlin2 years agoSuper User
I'm a bit lost as to what you are trying to achieve. Are you trying to predict when you run out of stock?
Your sample data may not be sufficient for the scenario.