Forum Discussion
Anonymous
3 years agoNot applicable
How do I build "logic" that pulls data from two different table rows
I have a table of events. Each event is a row in the table, and has a time & date stamp, an event "Type" and each event is associated with an activity, identified by an activity ID. As an e...
- 3 years ago
Hi Anonymous ,
Based on your description, I have created a simple sample:
Please try:
Apply the measure to the table visual's filter:
Flag = var _a = MAXX(FILTER(ALL('Table'),[Activity]=SELECTEDVALUE('Table'[Activity])&&[Date Time]<SELECTEDVALUE('Table'[Date Time])),[Date Time]) var _b = MAXX(FILTER(ALL('Table'),[Activity]=SELECTEDVALUE('Table'[Activity])&&[Date Time]=_a),[Type]) return IF(SELECTEDVALUE('Table'[Type])="Ready"&&_b="Error",1)Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jianboli-msft
Community Support
3 years agoHi Anonymous ,
Based on your description, I have created a simple sample:
Please try:
Apply the measure to the table visual's filter:
Flag =
var _a = MAXX(FILTER(ALL('Table'),[Activity]=SELECTEDVALUE('Table'[Activity])&&[Date Time]<SELECTEDVALUE('Table'[Date Time])),[Date Time])
var _b = MAXX(FILTER(ALL('Table'),[Activity]=SELECTEDVALUE('Table'[Activity])&&[Date Time]=_a),[Type])
return IF(SELECTEDVALUE('Table'[Type])="Ready"&&_b="Error",1)
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.