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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
dkbbr
Regular Visitor

Sales total combine.

How you guy's find a combined total sales? I find Total sales for each of them but it's customers and drivers separated. how you combine them. adding new column like "Role" using dax( i don't really need extra column)

DateCustomerPkIdCustomerNameDriverPkidDriverNameSaleAmount
24/01/011001Jhon2001Brain1000
24/01/021002jon2002Brown1250
24/01/021003jin2001Brain4502
24/01/031002jon2003Tom12515
24/01/041001jhon2004Toms1412

 

I wanna look like this after writing DAX :

 

NameRoleSale
JhonCustomer2412
BrainDriver5502
   
3 REPLIES 3
Anonymous
Not applicable

Hi @dkbbr ,

Based on the description, @rajendraongole1 the response provides the desired results. It should be helpful to you.

If you have solved the problem, please please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Wisdom Wu

rajendraongole1
Super User
Super User

Hi @dkbbr - you can create a new calculated table with combining the sales data for customers and drivers.

 

CombinedSales =
UNION(
    SELECTCOLUMNS(
        FILTER('Cmbine', NOT(ISBLANK('Cmbine'[CustomerPkId]))),
        "Name", 'Cmbine'[CustomerName],
        "Role", "Customer",
        "Sale", 'Cmbine'[SaleAmount]
    ),
    SELECTCOLUMNS(
        FILTER('Cmbine', NOT(ISBLANK('Cmbine'[DriverPkid]))),
        "Name", 'Cmbine'[DriverName],
        "Role", "Driver",
        "Sale", 'Cmbine'[SaleAmount]
    )
)

 

rajendraongole1_0-1718621643372.png

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





"The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value"?

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.