Forum Discussion
tsinning
3 years agoNew Member
Running Total
Hi, What is the best way to get a running total of assets by month. My table has a "date created" and "date retired" column. I want to look at how many assets were in service each month. Here is ...
- 3 years ago
Hi,
Please check the below picture and the attached pbix file.
I tried to simplify the sample like below.
I suggest having a calendar table like below.
Asset count measure: = CALCULATE( COUNTROWS(Data), FILTER( Data, Data[Created Date] <= MAX( 'Calendar'[Date]) && OR( Data[Retired Date] >= MIN('Calendar'[Date]), Data[Retired Date] = BLANK()) ) )
Jihwan_Kim
3 years agoSuper User
Hi,
Please check the below picture and the attached pbix file.
I tried to simplify the sample like below.
I suggest having a calendar table like below.
Asset count measure: =
CALCULATE( COUNTROWS(Data),
FILTER( Data,
Data[Created Date] <= MAX( 'Calendar'[Date]) &&
OR( Data[Retired Date] >= MIN('Calendar'[Date]), Data[Retired Date] = BLANK())
)
)