Forum Discussion
rogerdea
3 years agoHelper IV
Comparing Dates between tables
I am struggling to figures out how to compare dates between tables. So any help with best approach is appreciated. I've tried RELATED function but that wont work. The context is locations are op...
- Anonymous3 years ago
Hi rogerdea ,
Here are the steps you can follow:
1. Create calculated table.
Flag = var _table1= SUMMARIZE( 'DatesOpen', 'DatesOpen'[DateOpen],'DatesOpen'[Location],'DatesOpen'[CompKey], "DateFrom", MAXX( FILTER(ALL(FormsReceived),'FormsReceived'[CompKey]=EARLIER('DatesOpen'[CompKey])),'FormsReceived'[DateOpen]), "FromOutstanding", IF( 'DatesOpen'[CompKey] in SELECTCOLUMNS('FormsReceived',"1",'FormsReceived'[CompKey]),0,1)) return SUMMARIZE( _table1,[DateOpen],[DateFrom],[FromOutstanding])2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Anonymous
3 years agoNot applicable
Hi rogerdea ,
Here are the steps you can follow:
1. Create calculated table.
Flag =
var _table1=
SUMMARIZE(
'DatesOpen',
'DatesOpen'[DateOpen],'DatesOpen'[Location],'DatesOpen'[CompKey],
"DateFrom",
MAXX( FILTER(ALL(FormsReceived),'FormsReceived'[CompKey]=EARLIER('DatesOpen'[CompKey])),'FormsReceived'[DateOpen]),
"FromOutstanding",
IF(
'DatesOpen'[CompKey] in SELECTCOLUMNS('FormsReceived',"1",'FormsReceived'[CompKey]),0,1))
return
SUMMARIZE(
_table1,[DateOpen],[DateFrom],[FromOutstanding])
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly