Forum Discussion
Measure repeating values for table
Hello,
I have a table with 2 columns.. Type and Value
Measure 1:
toPay =
CALCULATE(
SUM(PAYMENTS[value]),
PAYMENTS[type] = "pay"
)
Measure 2:
toReceive =
CALCULATE(
SUM(PAYMENTS[value]),
PAYMENTS[type] = "receive"
)
The table is reapeating values for pay and receive, why?
I think this solution is:
marcio_fornari , Try like
toPay =
CALCULATE(
SUM(PAYMENTS[value]),
filter(PAYMENTS, PAYMENTS[type] = "pay")
)toReceive =
CALCULATE(
SUM(PAYMENTS[value]),
filter(PAYMENTS,PAYMENTS[type] = "receive")
)refer : dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/
2 Replies
- amitchandakSuper User
marcio_fornari , Try like
toPay =
CALCULATE(
SUM(PAYMENTS[value]),
filter(PAYMENTS, PAYMENTS[type] = "pay")
)toReceive =
CALCULATE(
SUM(PAYMENTS[value]),
filter(PAYMENTS,PAYMENTS[type] = "receive")
)refer : dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/
- marcio_fornariResolver I
Thanks amitchandak it's works!!
Thanks for the Refer too 🙂