cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rilimonv New Member
New Member

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

Accepted Solutions
Highlighted
Microsoft v-cherch-msft
Microsoft

Re: Measure for a segment of column who have certain attributes

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
Highlighted
Microsoft v-cherch-msft
Microsoft

Re: Measure for a segment of column who have certain attributes

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

Helpful resources

Announcements
New Ranks and Rank Icons in 2020

New Ranks and Rank Icons in 2020

Read the announcement for more information!

New Kudos Given Badges Coming

New Kudos Given Badges Coming

We're rolling out new Kudos Given badges. Find out how many Kudos you've given.

November 2019 Community Highlights

November 2019 Community Highlights

Get an overview of the events and great community content from November.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)