Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.
Hi,
I have a table like below:
User | Organization |
a | A |
b | A |
c | B |
d | B |
e | B |
f | C |
g | C |
h | C |
i | C |
j | C |
k | D |
l | E |
m | E |
n | E |
o | E |
p | F |
q | F |
r | F |
S | F |
I want to create a pie chart to count the
Number of organizations with 1 user
Number of organizations with 2-3 user
Number of organizations with more than 3 users, like below:
Hi @ArashZ
1)Go to Power Query editor and right click on the organization column and click 'Group By' as shown below:
2) Choose these settings and click OK.
3) You'll get a table like this:
4) Now click on close and apply:
5) Now create a calculated column like this using this DAX.
Count Bucket =
SWITCH(
TRUE(),
'Table'[Count] > 3,"Number of organizations with more than 3 users",
'Table'[Count] >1,"Number of organizations with 2-3 users",
"Number of organizations with 1 user"
)
Set the Summarization of Count to "Don't summarize".
6) Now plot the values in this way :
This is the required solution as requested.
Link to this .pbix file :
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Regards,
Aditya
Hi @Aditya_Meshram Thanks. But I don't want to create a physical table. Is there a way to calculate a table on the fly for this?
Thanks for the answer. However, would it be possible to create a measure or calculated column, instead of using power Query? I don't have access to power query and prefer using measures or columns.
To the best of my knowledge, I don't think it's possible to do so through measures or calculated columns. However, if you say that your problem is not having access to Power Query, you can bypass that by creating a summary table by clicking on New Table and using this DAX.
Summary table =
SUMMARIZE(
'Table',
'Table'[Organization],
"Count",
COUNT('Table'[User])
)
In this way you can get the table obtained in step 3 of my original solution without having to use Power Query. Then you can proceed like we did in the original solution.
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Regards,
Aditya
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
18 | |
13 | |
11 | |
10 | |
9 |