Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
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?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!