Forum Discussion
Return a column based on measure condition
I have two measues to caluculate the running total of Sales order qty and PO qty. Im gonna retune the column that show the smallest date that RT PO qty can cover SO qty. For example, i try to get 2021-02-02 as the date that the running total of SO qty is 20.
I used the following formuale. but it doesnt work.
ETA For each SO =
MINX(filter(ALLSELECTED('PO by Item'),'SO by Item'[RT Item SO Qty]<='PO by Item'[RT Item PO Qty]),'PO by Item'[PO ShipDate])
I tried to use lookupvalue, but doesnt work either, part of the reason i guess is RT SO qty and RT PO qty are not columns.
Could you please advise any change? Thanks in advance!
3 Replies
- amitchandak
Super User
fish123 , if you are trying to create a column and use a measure for that. That will not work.
You have to create a new measure only.
- fish123Frequent Visitor
yep, i tried to created a new measure, but i didnt figure out the issue of my formular.
ETA For each SO =
MINX(filter(ALLSELECTED('PO by Item'),'SO by Item'[RT Item SO Qty]<='PO by Item'[RT Item PO Qty]),'PO by Item'[PO ShipDate])
- AnonymousNot applicable
Hi fish123 ,
Is there a relationship between your two tables?
Try to delete the relationship and see if it succeeds.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.