Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
I'm new here and just beginning with Dax. I currently have formula that works well, but I'm having to make some adjustments to work with a test file. The test file data ends on January 18, 2018. Here is the formula:
Average Days to Sell = divide([Inventory Valuation (Today)],[Last 365 Days COGS Amount]) * 365
How would I write this to work with the final day being January 18, 2018 instead of (Today)?
Solved! Go to Solution.
Perhaps:
Measure =
VAR __Max = MAX('Table'[Date])
VAR __Value = LOOKUP('Table'[Inventory Value],'Table'[Date],__Max)
RETURN
divide(__Value),[Last 365 Days COGS Amount]) * 365
Difficult to be sure, Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Perhaps:
Measure =
VAR __Max = MAX('Table'[Date])
VAR __Value = LOOKUP('Table'[Inventory Value],'Table'[Date],__Max)
RETURN
divide(__Value),[Last 365 Days COGS Amount]) * 365
Difficult to be sure, Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |