Forum Discussion
Torudd-55
6 years agoFrequent Visitor
DAX formula
Hi! I would like to get help with a, hopefully, easy question. How can i write a DAX command/formula to only select all of the orders in a table that contains an item with a specific vendor. For ...
lc_finance
Solution Sage
6 years agoHi Torudd-55 ,
Here is how to prepare a calculated column to use for this filter.
You can download the Power BI file for my proposed solution from here.
Here are the steps:
1) I completely filled the order no so that each row has an order number
2) I added a calculated column for the orders with milk (Modeling -> New column)
Below is the DAX formula:
Orders with milk =
CALCULATE(CONTAINS('Orders',[vendor],"milk"),
ALLEXCEPT('Orders','Orders'[order.no]))Here is a screenshot of the new column, which you can use to filter out the table:
I hope this helps you. Do not hesitate if you have more questions.
LC
Interested in Power BI and DAX templates? Check out my blog at www.finance-bi.com