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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. 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
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.