Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
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 specified time frame.
I'm also open to suggestions for the proper name for this subject 😅 When you view this post, I appreciate all of your help 😊
Thank you.
Test File - https://drive.google.com/file/d/1kbQsdWT47QYGqnHOemsU040vrYcETNM1/view?usp=drive_link
Solved! Go to Solution.
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.
write what result you want to see
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.
Hi @Anonymous,
It works fantastic, thank you very much! 😊
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 57 | |
| 38 | |
| 35 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 73 | |
| 70 | |
| 37 | |
| 35 | |
| 25 |