Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello Power BI Community,
I am experiencing a problem with a DAX measure that calculates new customer sales. The measure works correctly at the row level of my visuals but it's not returning the expected value in the total line.
Here's the DAX code I'm using:
In the PriorCustomers variable, I'm using MIN(DateTable[Date]) to find the earliest date, but I suspect this might be causing the issue when it comes to calculating the grand total. It appears that this function returns the earliest date in the entire DateTable in the context of the total row, rather than the earliest date in the context of each row.
My sales data is related to the DateTable with a many-to-one relationship (sales.doc_date > DateTable.date). My sales table contains a field partner_count_code that identifies each customer, and total_selling_price to represent the sales amount.
When I create a visual that includes the New Customer Sales Value measure, the total row seems to be aggregating the entire total sales, not just the sales for new customers. I've even manually checked and found that even when filters are applied, the total is still incorrect.
Could anyone advise me on how to adjust my DAX formula to calculate the correct total for new customer sales regardless of the filter context?
Solved! Go to Solution.
Hi @SasoosaS ,
You can create a new measure to place on the visual object.
_New Customer Sales Value = SUMX(VALUES('DateTable'[YearMonth]),[New Customer Sales Value])
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @SasoosaS ,
You can create a new measure to place on the visual object.
_New Customer Sales Value = SUMX(VALUES('DateTable'[YearMonth]),[New Customer Sales Value])
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous,
Thank you for your solution.
The new measure you suggested works perfectly and has resolved my issue.
_New Customer Sales Value = SUMX(VALUES('DateTable'[YearMonth]),[New Customer Sales Value])
Your help is greatly appreciated. Thank you!
Best Regards,
Sašo
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
11 | |
11 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |