Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi All,
Hope you are doing great. I want to identify how many companies have multiple company ID's using DAX?
I don't want to do it on transformation using group by because its if failing and getting some error.
Find the sample data below.
Company ID | Companies |
1 | Apple |
2 | Apple |
3 | Samsung |
4 | Nokia |
5 | Motorolla |
6 | One Plus |
7 | One Plus |
Expected Output:
Count of Company ID's | Companies |
2 | Apple |
1 | Samsung |
1 | Nokia |
1 | Motorolla |
2 | One Plus |
Solved! Go to Solution.
Hi,
Drag Companies to the Table visual and drag this measure to the value area section
=DISTINCTCOUNT(Data[Company ID])
Hope this helps.
Hi,
Drag Companies to the Table visual and drag this measure to the value area section
=DISTINCTCOUNT(Data[Company ID])
Hope this helps.
This is really helpful.
Alos in order to identify only companies which has more than 2 ID's all I did is in the visual filters i have changed the count of Company ID >1 and that worked perfect.
You are welcome.
Try this measure:
No Of Company IDs = var NumberOfIds = COUNTAX( Company, Company[Company]) RETURN NumberOfIds
And a further:
DoesCompanyHaveMultiple = IF ([No Of Company IDs] > 1 , "Yes" , "No" )
Cheers,
Maria
User | Count |
---|---|
103 | |
87 | |
77 | |
70 | |
69 |
User | Count |
---|---|
113 | |
99 | |
97 | |
72 | |
68 |