Forum Discussion
PowerBI123456
5 years agoPost Partisan
Measure Help
If possible in a measure, I am trying to determine who the requester is on a particular response based on the date. For example, my data looks like: Based on the data, the requester fo...
- 5 years ago
Hi, PowerBI123456
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may go to 'Query Editor' and add an index column.
Then you may create a measure as below.
Requestor = var maxindex = CALCULATE( MAX('Table'[Index]), FILTER( ALL('Table'), [Date]<MAX('Table'[Date])&& [Action]="Request" ) ) return IF( MAX('Table'[Action])="Response", MAXX( FILTER( ALL('Table'), [Index]=maxindex ), [User] ) )Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-alq-msft
5 years agoCommunity Support
Hi, PowerBI123456
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may go to 'Query Editor' and add an index column.
Then you may create a measure as below.
Requestor =
var maxindex =
CALCULATE(
MAX('Table'[Index]),
FILTER(
ALL('Table'),
[Date]<MAX('Table'[Date])&&
[Action]="Request"
)
)
return
IF(
MAX('Table'[Action])="Response",
MAXX(
FILTER(
ALL('Table'),
[Index]=maxindex
),
[User]
)
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.