Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
119 | |
105 | |
78 | |
74 | |
52 |
User | Count |
---|---|
145 | |
108 | |
107 | |
90 | |
64 |