Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
jllprz
New Member

How to count the occurrences of the a specific value in a column

So, I am working on a project and it has 300,000 rows (which are consumers). Then I have a column named, Target. That target is to know if that consumer defaulted his or her account. So the column has 2 values (1 or 0), 1: Account default and 0: Did not default. I want to know how many values of 1 and how many values of 0 are there in the Target column. I also want to see in a pie chart, the percentage of people that defaulted their accounts and those who did not.

Thank you. 🙂

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1713236754612.png

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1713236754612.png

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Thank you so much! This is exactly what I needed! I appreciate it! Would you be able to type down the formula? I'm sorry, I'm currently on my phone right now and would love to see the formula. Thank you so much again.

Hi, I did not write any measure but just drag and drop to the visualization.

If you have your sample pbix file, but if it does not work, please share your sample pbix file's link and then I can try to look into it.

Thanks.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors