0
如何創建一個DAX度量,以顯示收貨餘額大於或等於付款餘額的第一個收貨日期?DAX來自不同表格的累計總計比較
例如,對於君,我希望[付款收據日期均價]指標顯示爲簡,因爲收據平衡是10比8。
對於八月的收支時,它會顯示因爲二月是因爲那裏的收據餘額至少是13
預期結果的收支的第一個日期:
數據模型
表:PO接收
表:付款
嘗試性解決方案
我已經定義了以下措施:
Receipt Balance:
=CALCULATE
(
SUM(PoReceipt[Quantity Received]),
FILTER
(
ALL (PaymentDates),
PaymentDates[Payment_FullDate] <= MAX (PaymentDates[Payment_FullDate])
)
)
Payment Balance:
=CALCULATE
(
SUM(Payment[Payment Amount]),
FILTER
(
ALL (PaymentDates),
PaymentDates[Payment_FullDate] <= MAX (PaymentDates[Payment_FullDate])
)
)