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.
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 an example of data
Solved! Go to Solution.
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())
)
)
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())
)
)
User | Count |
---|---|
28 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |