Forum Discussion
CTan42
Helper II
9 years agoRemove 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
Super User
9 years agoHey,
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
Helper II
9 years agoData 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