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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Your model must have a proper Date table (calendar). Then, you'd do:
Goods in Stock =
var __lastDateVisible = MAX( Calendar[Date] )
return
calculate(
[Quantity],
Calendar[Date] <= __lastDateVisible
)where [Quantity] should be a measure that returns the sum of quantity for any selection of attributes from your dimensions.
Best
Darek
Thank you for the support!
I tried the option you shared but did not work as expected. I am looking for an option to do inventory analysis for the last 'n' months seletced.
Item A
Item B
Item A - 100- March 2nd 2017
Item B - 200 - March 5th 2017
Item A - 300 - May 15th 2018
Item A - 400 - Dec 20th 2018
Item A - 500 - April 30th 2019
Item A - 400 - May 14th 2019
Item A - 200 - Jun 12th 2019
I am expecting an output as follows if I need to do analysis from july to back April 2019
April 2019 - 1500(100+200+300+400+500)
May 2019 - 1500+400=1900
Jun 2019 -1900+200 = 2100
July 2019 - 2100+0 = 2100
It need's to consider the entires from the very begining date to the end of months displays.
Thank you in advance.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 6 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 18 | |
| 14 | |
| 14 |