Forum Discussion
Anonymous
3 years agoNot applicable
Running Total including blanks
Hi, I have an issue where i'm trying to calculate a Running Total but if i have a blank value for an attribute then the running total is ignored. Please see attached screenshot of my table visual...
- 3 years ago
The problem is that the MAX is returning a blank value when that time doesn't exist in the filtered data set. You can use
Running Total = VAR ReferenceTime = CALCULATE( MAX( 'SnapshotDeal'[ClosedDealOpenTime] ), ALLEXCEPT( 'SnapshotDeal', 'SnapshotDeal'[ClosedDealOpenTime] ) ) VAR Result = CALCULATE( [SnapshotDealRowCount2], 'SnapshotDeal'[ClosedDealOpenTime] <= ReferenceTime ) RETURN Result
johnt75
Super User
3 years agoI don't quite understand how the value 36 is appearing if no rows correspond to that number. Can you share a sample PBIX file ?
Anonymous
3 years agoNot applicable
Here is a dropbox link to the sample file
- johnt753 years ago
Super User
The problem is that the MAX is returning a blank value when that time doesn't exist in the filtered data set. You can use
Running Total = VAR ReferenceTime = CALCULATE( MAX( 'SnapshotDeal'[ClosedDealOpenTime] ), ALLEXCEPT( 'SnapshotDeal', 'SnapshotDeal'[ClosedDealOpenTime] ) ) VAR Result = CALCULATE( [SnapshotDealRowCount2], 'SnapshotDeal'[ClosedDealOpenTime] <= ReferenceTime ) RETURN Result