Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I'm new to this code writing.... I'm trying to sum the number of unique customer codes that enter in our stores. I am coming up with a total by location but the region totals do not sum the stores. I'm at a loss...
Solved! Go to Solution.
Hi @Livia_Hernandez ,
Try the following formula which gets the cumulative value correctly.
M1 = DISTINCTCOUNT('Table'[Customer])
M2 =
SUMX (
VALUES ( 'Table'[Product] ),
CALCULATE ( DISTINCTCOUNT ( 'Table'[Customer] ) )
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Livia_Hernandez ,
Try the following formula which gets the cumulative value correctly.
M1 = DISTINCTCOUNT('Table'[Customer])
M2 =
SUMX (
VALUES ( 'Table'[Product] ),
CALCULATE ( DISTINCTCOUNT ( 'Table'[Customer] ) )
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @gmsamborn - I defintitely thought of that too. I was just trying to see how I could other than manually make the summs just count the stores. I tried group by with no luck. Just checking if I was doing something wrong or missing some sort of logic.
Thank you for replying!
Is it possible that a customer can be related to more than 1 StoreCode?
In a case like that, each StoreCode would count that customer but that customer would only be counted once in the total.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
14 | |
11 | |
8 | |
8 | |
8 |
User | Count |
---|---|
22 | |
13 | |
11 | |
10 | |
10 |