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.
I am developing an inventory dashboard. Each week there will be a weekly count. I would like to calculation the average usage. I know I need to calculate the difference from each week's count for an item then average this. However, I am getting nowhere on it.
Last Week = CALCULATE(DISTINCTCOUNT('Count'[Product Name]), 'Calendar'[Week Num] = MAX('Calendar'[Week Num])-1) Weekly Average = AVERAGEX(SUMMARIZE('Count','Count'[Quantity], "toAverage",[Last Week]),[Last Week])
This is returning 1 for values. which is correct then blank for others that should have a value.
My end goal is to use this as a minimum ordering level for 2 months. Multiplying the average weekly usage by 8.
Solved! Go to Solution.
Hi @mdennis05 try v2 below
Last Week v2 =
VAR __week_filt= MAX('Calendar'[Week Num])-1
CALCULATE(DISTINCTCOUNT('Count'[Product Name]), 'Calendar'[Week Num] = __week_filt)
Weekly Average = AVERAGEX(SUMMARIZE('Count','Count'[Quantity], "toAverage",[Last Week]),[Last Week])
Proud to be a Super User!
Hi @mdennis05,
Thanks for reaching out to the Microsoft fabric community forum.
It looks like you want to calculate the average of usage from your inventory dashboard. As @bhanu_gautam and @some_bih both responded to your query, please go through their responses and mark the helpful reply as solution.
I would also take a moment to thank @bhanu_gautam and @some_bih, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support Team
If this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.
Hi @mdennis05,
As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.
If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you.
Hi @mdennis05,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution so that other community members can find it easily.
Thank you.
Hi @mdennis05,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
@mdennis05 Try using
Calculate the previous week's count:
LastWeekCount =
CALCULATE(
SUM('Count'[Quantity]),
'Calendar'[Week Num] = MAX('Calendar'[Week Num]) - 1
)
Calculate the difference from the previous week:
DAX
WeekDifference =
SUM('Count'[Quantity]) - [LastWeekCount]
Calculate the average of these differences:
DAX
AverageWeeklyUsage =
AVERAGEX(
SUMMARIZE(
'Count',
'Calendar'[Week Num],
"WeeklyDiff", [WeekDifference]
),
[WeeklyDiff]
)
Calculate the minimum ordering level for 2 months (8 weeks):
MinOrderingLevel = [AverageWeeklyUsage] * 8
Proud to be a Super User! |
|
Hi @mdennis05 try v2 below
Last Week v2 =
VAR __week_filt= MAX('Calendar'[Week Num])-1
CALCULATE(DISTINCTCOUNT('Count'[Product Name]), 'Calendar'[Week Num] = __week_filt)
Weekly Average = AVERAGEX(SUMMARIZE('Count','Count'[Quantity], "toAverage",[Last Week]),[Last Week])
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |