Forum Discussion
CTan42
9 years agoHelper II
Remove Duplicates?
Below are my power bi sample. I am asked to create a dashboard to present the stat of left orders. For examples, i do a calculation: orders= calculate(count(ID)). The result shows there are 5 orders....
TomMartens
9 years agoSuper User
Hey,
I couldn't resist and created this measure
Remaining Payment latestOrder =
SUMX(
VALUES('OrdersPayment'[ID])
,
var latestOrderDate =
CALCULATE(MAX('OrdersPayment'[Date]))
return
CALCULATE(
SUMX('OrdersPayment',
IF('OrdersPayment'[Date] = latestOrderDate
,'OrdersPayment'[RemainingPayment]
,BLANK()
)
)
)
)
This is my sample data
And this is the result
Hope this is what you are looking for
Regards
CTan42
9 years agoHelper II
Data Updates:
In my dataset, there are 2 columns of Date - Order Date & Goods Received Date. So everything should calculated based on Goods Received Date. There is more than 1 row with exactly same date. And another question is some rows are blank as the goods are not received yet.
Thanks