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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.