Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone!
I'd like to calculate the date of sale (stock exit) for the following data, but when trying to use the earlier function, it doesn't quite work out for me.
I would like it to be a calculation column.
Solved! Go to Solution.
Hi @Asmoday1507 ,
Try this Column.
Expected sale date =
IF (
'Table'[Stock]
<> CALCULATE (
SUM ( 'Table'[Stock] ),
LASTDATE ( 'Table'[Date] < EARLIER ( 'Table'[Date] ) ),
ALL ( 'Table'[Stock] )
) && 'Table'[Date] <> MIN('Table'[Date]),
'Table'[Date]
)
The result should be like this.
Also, attached the pbix file as the reference.
Best Regards,
Community Support Team_Gao
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi @Asmoday1507 ,
Try this Column.
Expected sale date =
IF (
'Table'[Stock]
<> CALCULATE (
SUM ( 'Table'[Stock] ),
LASTDATE ( 'Table'[Date] < EARLIER ( 'Table'[Date] ) ),
ALL ( 'Table'[Stock] )
) && 'Table'[Date] <> MIN('Table'[Date]),
'Table'[Date]
)
The result should be like this.
Also, attached the pbix file as the reference.
Best Regards,
Community Support Team_Gao
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi @Asmoday1507 - you should be able to achieve what you're after using MAXX function.
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
I think your screenshot does not reflect what you need ...
Can you explain in few lines and also check the screenshot image adapt those requirements?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
104 | |
87 | |
73 | |
66 |
User | Count |
---|---|
122 | |
112 | |
98 | |
79 | |
72 |