Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi there
I have a data set with one column with the name of companies and another column which states what size company they are i.e. Micro, Small, Medium or Large. In that column the responses are
Micro: 1-9
Medium: 50-249
Small: 10-49
Large: 250+
The companies column contains duplicate entries. All in all my data set contains around 100 duplicates.
I have created a measure which removes the duplicates, it takes the following form:
Measure 1 = DISTINCTCOUNT('Table Name'[Company Name])
I have created three further measures for Micro, Small and Medium taking the following form:
Micro = COUNTROWS(FILTER('Table Name', 'Table Name'[Company Size]= "Micro: 1-9"))
Small = COUNTROWS(FILTER('Table Name', 'Table Name'[Company Size]= "Small: 10-49"))
Medium= COUNTROWS(FILTER('Table Name', 'Table Name'[Company Size]= "Medium: 50-249"))
And I have created a further measure to add three up to leave me with SMEs.
SME = [Micro]+[Small]+[Medium]
I'm having trouble combining the distinct measure and the SME measure into one formula so that the duplicates are removed first and then with Small, Micro and Medium businesses are counted up so that those remaining count of companies will be SMEs only.
Can anyone assist me in order to resolve this problem for me?
Thanks in advance!
DP
Solved! Go to Solution.
Hey @DP2022 ,
If you are looking for a total distinct count of Micro, Medium & Small without any distinction, you can create a measure :
Measure 2 = Calculate(DISTINCTCOUNT(Table Name[Company Name]),Filter(Table Name,Table Name[Company Size] in {"Micro: 1-9","Small: 10-49","Medium: 50-249"}))
Hey @DP2022 ,
If you are looking for a total distinct count of Micro, Medium & Small without any distinction, you can create a measure :
Measure 2 = Calculate(DISTINCTCOUNT(Table Name[Company Name]),Filter(Table Name,Table Name[Company Size] in {"Micro: 1-9","Small: 10-49","Medium: 50-249"}))
@PC2790
Thanks for the quick response, I've just applied your measure and it works perfectly!
I appreciate your help!
DP
User | Count |
---|---|
94 | |
90 | |
79 | |
77 | |
71 |
User | Count |
---|---|
119 | |
105 | |
90 | |
64 | |
63 |