Forum Discussion
dannyboy123
2 years agoFrequent Visitor
Filtering a measure
Hi.
I have the following data in a table...
The left hand column is week number. I want to create a measure that always returns the latest week only. I've been trying for a few hours and it's barely worth showing my efforts as I've got nowhere 🙂
Any help much appreciated
Try this:
First create a measure that will get your maximum week:
LatestWeek = CALCULATE(MAX('TableName'[YourWeekColumn]),ALL('TableName'))Then create another measure:
LatestWeekFlag = LatestWeekFlag = IF(SELECTEDVALUE('TableName'[YourWeekColumn] = [LatestWeek], 1, 0)Use it as a filter:
1 Reply
- ray_aramburoSuper User
Try this:
First create a measure that will get your maximum week:
LatestWeek = CALCULATE(MAX('TableName'[YourWeekColumn]),ALL('TableName'))Then create another measure:
LatestWeekFlag = LatestWeekFlag = IF(SELECTEDVALUE('TableName'[YourWeekColumn] = [LatestWeek], 1, 0)Use it as a filter: