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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
v_mark
Helper V
Helper V

Calculate based on certain Date criteria similar to previous month

Good day,

 

Been struggling to figure out what is the best way to calculate these.
 

Begin Inv : the count of open items to start the specific month

  Closure: the number of items closed in the specific month

 

What I want to have is a measure that will calculate any placement that is open on Jan 1st of 2021.

Which considered as the begin inventory for the start of the month and if the close date is =<12-31-2020 (for example)  it would not count. 

 

What I have so far: Begin Inventory # = CALCULATE(COUNTROWS('sample'),'sample'[Status] = "Open")

 

and another calculation that would determine how many were closed in a month eg. 01-01-2021 to 01-31-2021.

which I believe I was able to do so by doing. 

 Closure: CALCULATE(COUNTROWS('sample'),'sample'[Status] = "Closed" )

 

 Please see the pbix file here 

 

2 REPLIES 2
amitchandak
Super User
Super User

If Jan 1st an example, As far begin inventory is concern what I am hoping to get is to count all the open items <= 12/31/2021

 

like for Feb 1st count all the open items <=01/31/2021 and goes on

 

Which talks about ONLY the last day of the previous month and put it on a table 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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