Forum Discussion
elemesey
3 years agoFrequent Visitor
Count Value Lookup
Good day everyone, I'm a beginner to DAX and need assistance. I have a list of customers that have made sales, and I'd like to know the total number of customers who have not made sales during the...
- Anonymous3 years ago
Hi elemesey ,
I suggest you to try code as below.
Count of Customer no sales = VAR _COUNTBYREGION = SUMMARIZE ( Sales, Sales[Region], "COUNTBYREGION", CALCULATE ( DISTINCTCOUNT ( Allcustomer[Customer] ), ALLEXCEPT ( Allcustomer, Sales[Region] ) ) ) RETURN SUMX ( _COUNTBYREGION, [COUNTBYREGION] ) - CALCULATE ( DISTINCTCOUNT ( Allcustomer[Customer] ) )Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ahmedx
Super User
3 years agowrite what result you want to see
- Anonymous3 years agoNot applicable
Hi elemesey ,
I suggest you to try code as below.
Count of Customer no sales = VAR _COUNTBYREGION = SUMMARIZE ( Sales, Sales[Region], "COUNTBYREGION", CALCULATE ( DISTINCTCOUNT ( Allcustomer[Customer] ), ALLEXCEPT ( Allcustomer, Sales[Region] ) ) ) RETURN SUMX ( _COUNTBYREGION, [COUNTBYREGION] ) - CALCULATE ( DISTINCTCOUNT ( Allcustomer[Customer] ) )Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- elemesey3 years agoFrequent Visitor
Hi Anonymous,
It works fantastic, thank you very much! 😊