0
我在通過PowerPivot給出正確數字的計算函數時遇到問題。假設有以下信息。DAX計算多個標準問題
RepairsTable
Repair ID Location Amount Date
1 West 50 Aug
2 East 60 Aug
3 West 40 Sep
4 East 30 Sep
5 West 1000 Sep
MilesTable
Location Miles Date Total Amt Repairs
West 100 Sep
East 100 Aug
在數表中的總金額是維修PowerPivot中的計算列,我想展示基於位置&從表修理修理日期的總金額$。
我已經使用以下公式:
=CALCULATE(SUM(RepairsTable[Amount]),FILTER(RepairsTable,RepairsTable[Date]=MilesTable[Date]))
和
=CALCULATE(SUM(RepairsTable[Amount]),FILTER(RepairsTable,RepairsTable[Location]=MilesTable[Location]))
除了:
=CALCULATE(SUM(RepairsTable[Amount]),FILTER(RepairsTable,RepairsTable[Date]=MilesTable[Date]&&RepairsTable[Location]=MilesTable[Location]))
和
=CALCULATE(SUM(RepairsTable[Amount]),FILTER(RepairsTable,RepairsTable[Date]=MilesTable[Date]),FILTER(RepairsTable,RepairsTable[Location]=MilesTable[Location]))
我不能爲我的生活似乎拿出了Total Amt Repairs
計算列中的正確值。我要尋找的值是:
1040 for West/Sep
60 for East/Aug
我能做到這一點就好了,在電子表格中的SUMIFS
功能,但我不能讓它在的PowerPivot工作。