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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

My visual totals are not maching with the exported data

Hi,

Need your help with this problem

 

I have this model

Laura_Munoz_0-1668650555881.png

 

The primary key for the union is the ORDER_DATE and for this calcultaion I am only using the Customers Table

Laura_Munoz_1-1668651021816.png

The total is 1491 for new users with a web account but when I export the data and sum each day the real total is 1797.


Measures:

# Customers - New = CALCULATE(DISTINCTCOUNT(Customers[CUSTOMER_SPK]),Customers[ORDER_DAYS_AFTER_FIRST_ORDER]=0 || Customers[ORDER_DAYS_AFTER_FIRST_ORDER] = -1)
 
# Customers - New Mobile = CALCULATE([# Customers - New] ,
FILTER('Customers','Customers'[ORDER_SOURCE]="mobile"))
 
# Customers - New Web = CALCULATE([# Customers - New] ,
FILTER('Customers','Customers'[ORDER_SOURCE]="web"))



1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

DISTINCTCOUNT is not additive so I wouldn't expect the total to be the sum of the values on each day. For example, if Day 1 has Customers #1, #2, and #3 and Day 2 and Customers #2, #3, and #4, then there are only 4 distinct customers for Day 1 and Day 2 combined (summing 3 + 3 would double count #2 and #3.)

 

You can force the total to be the sum of the parts by explicitly iterating over each day but it isn't clear to me if that makes sense in your situation or not. If you do need this, you may want to take a look at @Greg_Deckler's post here: https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/td-p/547907

 

Recommended reading:
https://www.sqlbi.com/articles/why-power-bi-totals-might-seem-inaccurate/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

That answer may be correct if the same Web customer transacted on different dates.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Greg_Deckler
Super User
Super User

@Anonymous Please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e

Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
AlexisOlson
Super User
Super User

DISTINCTCOUNT is not additive so I wouldn't expect the total to be the sum of the values on each day. For example, if Day 1 has Customers #1, #2, and #3 and Day 2 and Customers #2, #3, and #4, then there are only 4 distinct customers for Day 1 and Day 2 combined (summing 3 + 3 would double count #2 and #3.)

 

You can force the total to be the sum of the parts by explicitly iterating over each day but it isn't clear to me if that makes sense in your situation or not. If you do need this, you may want to take a look at @Greg_Deckler's post here: https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/td-p/547907

 

Recommended reading:
https://www.sqlbi.com/articles/why-power-bi-totals-might-seem-inaccurate/

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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