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

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.

Reply
rilimonv
Employee
Employee

Measure for a segment of column who have certain attributes

Hi, 

 

I am very new to PowerBI and I'm trying to get the following done:

 

I have a 7 binary column (1,NULL) for a certain group of people. and then I have a measure that adds up all of the people. What I want to do, is create a measure that gives me % of the total for those users who are "1" in the binary columns. 

So for example, let's say the total of people I have is 6 and in one of the binary columns, only 4 of those are "1". I want to create a measure that calculates the 4/6. It's kind of a sumifs and then division, but I am not familiar with DAX. Any help will be highly appreciated!

 

 

1 ACCEPTED SOLUTION
v-cherch-msft
Employee
Employee

Hi @rilimonv 

You may create a measure like below:

Measure = COUNTROWS(FILTER(Table1,Table1[binary]=1))/COUNTROWS(Table1)

a1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-cherch-msft
Employee
Employee

Hi @rilimonv 

You may create a measure like below:

Measure = COUNTROWS(FILTER(Table1,Table1[binary]=1))/COUNTROWS(Table1)

a1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.