Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello all,
I was looking for a way to create a calculated column that auto calculate the duration between dates in a date column called orderdate, with a filter of another column let's call it Product.
I composed the following expression:
In the small red circle there are two consecutive values of 1. My goal is to subtract the dates in the red column
Your previousdate variable has only a < EARLIER. Change that to <=.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Do you have an index column? How do you sort the rows?
I sorted the table manually.
No index column. I prefer if the solution is not based on extra columns
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
26 |
User | Count |
---|---|
97 | |
87 | |
43 | |
40 | |
35 |