Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
23 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
7 | |
6 |