The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
User | Count |
---|---|
25 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |