Forum Discussion
Livia_Hernandez
Helper I
2 years agoCaclulating a cusomter count - help!
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....
- Anonymous2 years ago
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 KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
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.