Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
redalert787
Helper II
Helper II

Help needed DAX formula for calculating inventory coverage

Hello, 

 

I posted this earlier but I never got a response. I'm wondering if any DAX wizards can help with the below:

 

I work for a retailer and am building a dashboard to help model inventory coverage based on our inventory and sales. I am using power query/ power pivot but I'm not too familiar with DAX functions so I was hoping I could get some help here. 

 

The basic calculation I would like to do is for inventory coverage that I can bring into a pivot table. We calculate inventory coverage as: inventory/(sales for last 4 weeks/4). 

 

Ideally, the equation of inventory coverage just because a formula that I can look at in the pivot table across stores or across product category etc. I'm just having a hard time getting the calculation in DAX. It would be a pretty simple one in calculated formulas in a normal pivot table so if someone can guide me in the right direction, I would really appreciate it. 

 

here is a link for a sample data set of what I am using showing the sales and inventory of the stores and warehouse: 

 

https://amersportsonline-my.sharepoint.com/:x:/g/personal/ardi_sardashti_amersports_com/EeSjobC4xgZF... 

 

 

Here's an example of the pivot table currently: 

 

 
 
 

Example pivot table sales and inv.JPG

1 REPLY 1
AllisonKennedy
Super User
Super User

@redalert787  Sorry, I'm not sure what you're trying to do? The pivot table you posted - that is just a simple matrix visual in Power BI, but I don't think that's the final result you're looking for?

 

How do you know which Warehouse relates to which Sales/Stores? 

 

Also, in your sample file the Total Inventory column is empty?

 

Please provide desired output, and sample values for all columns of data and we can help better. 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors