Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
Could you please create me a powerbi measure to filtre data to only show sales order numbers where the warehouse doesnt match the po numbers warehouse putting a Y for Mismatched and N for matched- the data : Purchasing ;Warehouse . SalesOrderItems; Warehouse, Order Number, PO Number. there is a relationship between SaleOrderItems; PO Number and Purchasing: Order Number.
sample Data:
SalesOrdersItems
| Order Number | Warehouse | PO Number |
| 225976 | Direct to Customer | 25641 |
| 265897 | Direct to Customer | 25643 |
| 265389 | East | 25645 |
| 265972 | General | 25649 |
| 225978 | West | 25647 |
| 226594 | General | 25646
|
Purchasing
| Purchase order number | Warehouse | Sales Order number |
| 25641 | Direct to Customer | 225976 |
| 25643 | General | 265897 |
| 25645 | General | 265389 |
| 25649 | East | 265972 |
| 25647 | West | 225978 |
| 25646 | Direct to Customer | 226594 |
Solved! Go to Solution.
you can try this
Proud to be a Super User!
you can try this
Proud to be a Super User!
Hi, I got an error: The syntax for 'return' is incorrect. (DAX(maxx(FILTER(Purchasing,Purchasing[Order Number]=SalesOrdersItems[PO Number]&&SalesOrdersItems[Order Number]=Purchasing[Sales Order No]),Purchasing[Warehouse])return if( _w=SalesOrdersItems[Warehouse],"Y","N"))).
Hi @Anonymous ,
I reproduced your error below.
Your problem is that the var definition is missing. After adding "var _w=" and it worked.
Hope it helps.
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.
could you pls provide your pbix file?
Proud to be a Super User!
hi @Anonymous ,
for "relationship between SaleOrderItems; PO Number and Purchasing: Order Number.", which is one side?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.