Forum Discussion
mlmagl14
Helper I
4 years agoPulling multiple results from one column
I have a sales report and one of the columns list all our vendors. I'd like to calculate the total profit of two of the vendors, but I don't know how to enter the correct dax to pull more than one ve...
- 4 years ago
mlmagl14 ,
The double pipe is used as an "OR" condition. Please try something like this:
Gross Profit = CALCULATE(SUM('Table'[Profit]), FILTER( Table, 'Table'[Product Vendor] = "Vendor 1" || 'Table'[Product Vendor] = "Vendor 2" ))If you have multiple Vendors, you can also make use of the "IN" function.
Hope this helps.
Regards,
rsbin
Community Champion
4 years agomlmagl14 ,
The double pipe is used as an "OR" condition. Please try something like this:
Gross Profit = CALCULATE(SUM('Table'[Profit]),
FILTER( Table, 'Table'[Product Vendor] = "Vendor 1" ||
'Table'[Product Vendor] = "Vendor 2" ))
If you have multiple Vendors, you can also make use of the "IN" function.
Hope this helps.
Regards,
mlmagl14
Helper I
3 years agoThank you!