0
votes

Got two tables in power Pivot (table 1) and (table 2) Table 1 got a column with Buy/Sell values.

And table 2 got a column called "total value" (which is a currency column)

The tables are connected through a key column (with the exact matching numbers of course)

I want to calculate the the rows with table 1 (Buy) values, against the table 2 column with (total Value).

To summarize I want a measure to know how much is the total value of all the "Buy" and one measure for all the "Sell" values.

tried this formula but it didn't work:

Insider buys Total:=
CALCULATE(
QcomInsider[Total Value];
    FILTER('QcomBuyOrSell';
    QcomBuyOrSell[Buy/Sell] = "Buy"); 
    (QcomInsider[Total Value])
)

help much appreciated even if I need more than 2 measures

1

1 Answers

0
votes

I think you are very close, just use SUM over the right column and you are done.

BUY

Insider buys Total:=
CALCULATE(
SUM(QcomInsider[Total Value]);
    FILTER('QcomBuyOrSell';
    QcomBuyOrSell[Buy/Sell] = "Buy")
)

SELL

Insider sells Total:=
CALCULATE(
SUM(QcomInsider[Total Value]);
    FILTER('QcomBuyOrSell';
    QcomBuyOrSell[Buy/Sell] = "Sell")
)

Let me know if this helps.