Forum Discussion

BHigh37's avatar
BHigh37
Regular Visitor
6 years ago
Solved

Avoid Summing Values with Duplicate Fields

I've been reading about duplicate values but cannot find what I'm looking for.  I'm tracking stats of sales data in restaurants.  We have various account types that can pay for checks.  I need to track the accounts without doubling up on the sales data.  Consider the following data.  Two people ate in the restaurant and split the bill.

 

CheckAccountCoversSales
12345A20022$100
12345A20032$100

 

Results that need to be returned:

1 distinct check

2 distinct accounts

2 covers

$100 in sales

 

I have a report setup already, only problem is I'm double reporting some covers and sales numbers.  I have a matrix table and various cards (single and multi-row).  This is a simplified example, but the point gets accross.  I want to report totals at the bottom of the covers and sales columns to be 2 and $100, respectively, while still allowing me to report the distinct number of accounts that were used.

 

I'm sure there is a DAX way to do this in modeling, but I cannot wrap my head around it.

3 Replies