Forum Discussion
andybamber
5 years agoHelper III
Row Context Issues
Hello Everyone! Hoping someone can help... its a context thing, but i just cant work it out! Attached is a data set which shows the issue... Essentially i am calculating the difference in Res...
- 5 years ago
andybamber See if this is the desired result:
The file is attached below my signature.
Measure = VAR MaxDate = CALCULATE ( MAX ( Resource[snaphot_stamp] ), ALL ( Resource ) ) VAR CurrentWeekAmount = CALCULATE ( DISTINCTCOUNT ( Resource[resource_key] ), Resource[snaphot_stamp] = MaxDate ) VAR LastWeekAmount = CALCULATE ( DISTINCTCOUNT ( Resource[resource_key] ), Resource[snaphot_stamp] = MaxDate - 28 ) VAR Result = CurrentWeekAmount - LastWeekAmount RETURN Result
andybamber
5 years agoHelper III
AntrikshSharma thats perfect! so easy when you see it! thanks, Andy