Forum Discussion
DIVIDE DISTINCT COUNT WITH FILTER
- 8 years ago
Hi Sachet_716
Lidya Anonymous is correct here. You need to have all possible codes in the customer table.
Just in case if you still want to make this work. Do the following
Step 1 - Delete the relationship between Sales and Customer Tables
Step 2 - Add a following measure to the Customer table
Total Customer Country Wise = CALCULATE(DISTINCTCOUNT(CUSTOMER[CUSTOMER CODE]),ALLSELECTED(CUSTOMER[COUNTRY]))
Step 3 : Update your Coverage % formula to
Coverage% = DIVIDE (DISTINCTCOUNT('SALES DATA'[Customer Code]) ,[Total Customer Country Wise])
Step 4: Insert a slicer on Country from Customer Table and NOT the Sales Table
I am supposing it should then work!
Sending you 2 files to look over -
With Relationships and Corrected Data
Without Relationships and (As is Data)
Hi Chandeep,
Thank you for the reposnse, however, its giving me the same output whenever i apply some filters on the slicer. Can you check my pbix file below? I placed there my expected result, or perhaps, it is not doable?
https://drive.google.com/open?id=1rM5IAqUWDN0Disei1mtzZzhHFnPfCVR9
Rgds, Sachet
Hi Sachet_716
Lidya Anonymous is correct here. You need to have all possible codes in the customer table.
Just in case if you still want to make this work. Do the following
Step 1 - Delete the relationship between Sales and Customer Tables
Step 2 - Add a following measure to the Customer table
Total Customer Country Wise = CALCULATE(DISTINCTCOUNT(CUSTOMER[CUSTOMER CODE]),ALLSELECTED(CUSTOMER[COUNTRY]))
Step 3 : Update your Coverage % formula to
Coverage% = DIVIDE (DISTINCTCOUNT('SALES DATA'[Customer Code]) ,[Total Customer Country Wise])
Step 4: Insert a slicer on Country from Customer Table and NOT the Sales Table
I am supposing it should then work!
Sending you 2 files to look over -
With Relationships and Corrected Data
Without Relationships and (As is Data)
- Sachet_7168 years ago
Helper I
Thank you Chandeep, I tried this and this works. :)
Rgds, sachet