Forum Discussion
Anonymous
6 years agoNot applicable
Pulling Value from Another Table based on Two Date Fields
Hi, I have two tables as part of a data model - one called 'pbi TablePriceDiscStaging' and another called 'SalesOrderLineV2Staging'. These two tables are linked via a field called 'AccountItemUnit....
- 6 years ago
Anonymous
You could try this measure:
Amount in Pricing Agreement Dates = CALCULATE ( SUM('pbi TablePriceDiscStaging'[Amount]), FILTER ( 'pbi TablePriceDiscStaging', 'pbi TablePriceDiscStaging'[FROMDATE] <= MIN ( SalesOrderLineV2Staging[ORDERCREATIONDATETIME] ) && 'pbi TablePriceDiscStaging'[TODATE] > MAX ( SalesOrderLineV2Staging[ORDERCREATIONDATETIME] ) ) )
DataZoe
Microsoft Employee
6 years agoAnonymous
You could try this measure:
Amount in Pricing Agreement Dates =
CALCULATE (
SUM('pbi TablePriceDiscStaging'[Amount]),
FILTER (
'pbi TablePriceDiscStaging',
'pbi TablePriceDiscStaging'[FROMDATE] <= MIN ( SalesOrderLineV2Staging[ORDERCREATIONDATETIME] )
&& 'pbi TablePriceDiscStaging'[TODATE] > MAX ( SalesOrderLineV2Staging[ORDERCREATIONDATETIME] )
)
)- Anonymous6 years agoNot applicable
DataZoe , thank you so much, this worked!