Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi guys, I want to calculate the sales amount of a customer given a specific product in comparison to the total sales of the company as a whole for that same product but I am having trouble with my calculations.
To get total sales of customer I just use a simple CUSTOMER SALES = CALCULATE(TOTAL SALES) which would be filtered when I select my customer and product.
But for total sales of that product should I use ALL or ALLSELECTED. CALCULATE(TOTAL SALES),ALL(TABLE),PRODUCT = ALLSELECTED(PRODUCT)) ???
Solved! Go to Solution.
// Assumptions:
// Sales - fact table with sales
// Customers - dimension that stores all customers
// and joins to Sales on CustomerID.
// Products - dimension that stores all prouducts
// and joins to Sales on ProductID
[Total Sales] = SUM( Sales[Amount] )
[Total Sales (All Custs)] =
CALCULATE(
[Total Sales],
ALL( Customers )
)
// Assumptions:
// Sales - fact table with sales
// Customers - dimension that stores all customers
// and joins to Sales on CustomerID.
// Products - dimension that stores all prouducts
// and joins to Sales on ProductID
[Total Sales] = SUM( Sales[Amount] )
[Total Sales (All Custs)] =
CALCULATE(
[Total Sales],
ALL( Customers )
)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 8 | |
| 8 | |
| 7 |