Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
mlmagl14
Helper I
Helper I

Pulling 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 vendor from the vendor column.

 

I can get the result with 1 vendor, but how do I add a second one? I used this formula to get the profit sum from one of the vendors:

Gross Profit = CALCULATE(SUM('Table'[Profit]),'Table'[Product Vendor]= "Vendor1" 

 

Thanks in advance. 

 

1 ACCEPTED SOLUTION
rsbin
Super User
Super User

@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,

View solution in original post

2 REPLIES 2
rsbin
Super User
Super User

@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,

Thank you!

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors