Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
fish123
Frequent Visitor

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. 

fish123_0-1611615586389.png

 

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 3
v-stephen-msft
Community Support
Community Support

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.

amitchandak
Super User
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.

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])

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.