Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
I've got a dataset consisting of some items that are continously added to the inventory and continously removed from the inventory. In this way each item has a start date and an end date (if removed) or the end date is empty. An example is given below. I want to create a graph with drill down where you on a given date can see how many items is on the inventory and by drilling down yoy can see the items. Any suggestions about how to accomplish this?
Item Start_date End_date
Item1 1/1-2015 30/4-2016
Item2 3/2-2015 2/2-2016
Item3 4/4-2016
Item4 5/1-2015 7/6-2015
Hi @Klarsen,
Here is an approach using an 'events in progress' type measure which is appropriate when your table has start and end dates.
(see this paper page 27: http://www.sqlbi.com/wp-content/uploads/DAX-Query-Plans.pdf)
Here is a Sample PBIX file
The measure looks like this.
Notes:
Inventory Count = SUMX ( GENERATE ( CALCULATETABLE ( SUMMARIZE ( Inventory, Inventory[Start_date], Inventory[End_date], "Rows", COUNTROWS ( Inventory ) ), ALL ( 'Date' ) ), INTERSECT ( DATESBETWEEN ( 'Date'[Date], Inventory[Start_date], Inventory[End_date] ), LASTDATE ( 'Date'[Date] ) ) ), [Rows] )
Hi There,
Please see this file here for the solution.
https://drive.google.com/open?id=0B5-C_3XrFPdOV19uNHlVQmNvcG8
Thanks & Regards,
Bhavesh
If you like my post, please hit the "Kudo" Button and mark it as solution.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.