Forum Discussion
How to create Measure with filter?
- 6 years ago
Hi Anonymous ,
A1: Can you please share some screenshots? I can't understand what you mean. Please share the steps what you did and the results what you want.
A2: Please try the formula below:
Filter sales = CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', 'Table'[CustomerName] = "Toyota" && OR ( 'Table'[CustomerCity] = "London", 'Table'[CustomerCity] = "Liverpool" ) ) )Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try
Filter sales =calculate(sum(sales[day sales]),filter(customer, CustomerName="Toyota" && CustomerCity = "London")
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.
My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
- Anonymous6 years agoNot applicable
Thanks. I'm close. I have additional questions.
Question 1: I'm getting format error when using also CustomerId="1". Possible to use Interger too?
Question 2: Is it possible to filter if CustomerName = "Toyota" && (CustomerCity = "London" or CustomerCity = "Liverpool")
- v-xuding-msft6 years agoCommunity Support
Hi Anonymous ,
A1: Can you please share some screenshots? I can't understand what you mean. Please share the steps what you did and the results what you want.
A2: Please try the formula below:
Filter sales = CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', 'Table'[CustomerName] = "Toyota" && OR ( 'Table'[CustomerCity] = "London", 'Table'[CustomerCity] = "Liverpool" ) ) )Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.