Forum Discussion
Anonymous
5 years agoNot applicable
Measure for previous available date
I'm currently using the 'card with states by okviz' custom visual. They have a target field which is used to compare against the current measure. I'm looking to compare against the previous avail...
- Anonymous5 years ago
Hi Anonymous,
You can create a measure as below:
Pre FileCount = VAR _curfolderid = MAX ( 'Good Data'[Folder ID] ) VAR _curdate = MAX ( 'Good Data'[Date] ) VAR _predate = CALCULATE ( MAX ( 'Good Data'[Date] ), FILTER ( ALL ( 'Good Data' ), 'Good Data'[Folder ID] = _curfolderid && 'Good Data'[Date] < _curdate ) ) VAR _prefilecount = CALCULATE ( SUM ( 'Good Data'[File Count] ), FILTER ( ALL ( 'Good Data' ), 'Good Data'[Folder ID] = _curfolderid && 'Good Data'[Date] = _predate ) ) RETURN _prefilecountBest Regards
Rena
Anonymous
5 years agoNot applicable
I’d use Power Query: Assuming you are gonna sort this thing;
Add a custom column like so: let L => each List.PositionOf([Count])-1 in
[Count]-List.Range([Count], L)