Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I am trying to divide by the number of weeks that have passed in a promotion. So say I have a promotion that is lasting 6 weeks. I have 21 sales in the first 3 weeks. So I would want that number to be 7. If it was 24 sales in 4 weeks I would want it to be 6 etc. Any ideas on how to create this is a measure/calculated column?
Solved! Go to Solution.
Sales_Per_Week = //try this
VAR Total_Sales = [Total Sales]
VAR Start_Date = [Start Date]
VAR Today_Date = TODAY()
VAR Weeks_Passed = INT((Today_Date - Start_Date) / 7) + 1
RETURN
DIVIDE(Total_Sales, Weeks_Passed)
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
share your sample data
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
I am not sure how to insert the excel file, but here is a screenshot.
So say that the date is 3/31/2024. I wouldn't know what the future sales would be, but I wouldn't want to divide by those extra dates that haven't happened yet so it would be divided by 3 because 3 weeks have passed on the date of 3/31/2024.
Sales_Per_Week = //try this
VAR Total_Sales = [Total Sales]
VAR Start_Date = [Start Date]
VAR Today_Date = TODAY()
VAR Weeks_Passed = INT((Today_Date - Start_Date) / 7) + 1
RETURN
DIVIDE(Total_Sales, Weeks_Passed)
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
Average_Sales_Per_Week =
VAR Total_Sales = [Total Sales] //Measure
VAR Weeks_Passed = [Weeks Passed] //Measure
RETURN
DIVIDE(Total_Sales, Weeks_Passed)
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
I don't have the measure in place for the [Weeks Passed]. I would need this piece as well if possible. I have a promotion Start date column and an End date column. I also have a week starting column.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 85 | |
| 69 | |
| 38 | |
| 29 | |
| 27 |