Counting the text values

+2 votes

I have data like below

ProductID OrderID Flag Value
111 1 Yes 10
111 2 No 10
112 1 No 20
112 2 Yes 20

I need to count only "Yes". 

I tried with count distinct but for order 112 it is counting only "No". 

I need to count "Yes" even if 1st row entry in data is "No"

Aug 26, 2019 in Power BI by anonymous
731 views

2 answers to this question.

+2 votes

Hi!

Create a column using contains( ) like below.

Count = IF(CONTAINS('table','table'[Flag],"Yes"),1,0)

answered Aug 29, 2019 by anonymous
• 33,030 points
+2 votes
To get the count of only yes, use this Dax.

Yes_count = IF('29Aug'[Flag]=="Yes",1,0)
answered Aug 29, 2019 by anonymous
• 33,030 points

Related Questions In Power BI

0 votes
1 answer

To expand all lists in a row of lists at the same time without recurring values

Can't promise simple, but I have something ...READ MORE

answered Feb 19, 2019 in Power BI by Upasana
• 8,620 points
6,221 views
+1 vote
0 answers

How can I count the distinct values in a column using Power BI?

How can I count the distinct values ...READ MORE

Oct 23 in Power BI by Evanjalin
• 7,490 points
193 views
0 votes
1 answer

Profile all the data tables

you can automatically get a profile for ...READ MORE

answered Sep 20, 2018 in Power BI by Kalgi
• 52,350 points
779 views
0 votes
1 answer

Import data whose size exceeds the limit

​Chop your dataset into 500 sets, each ...READ MORE

answered Sep 25, 2018 in Power BI by Kalgi
• 52,350 points
1,210 views
0 votes
1 answer

Real time power bi dashboard update without refreshing the browser

The only solution possible by code - ...READ MORE

answered Sep 28, 2018 in Power BI by Kalgi
• 52,350 points
1,905 views
0 votes
1 answer

Can I publish the Power BI dashboards directly to client’s website?

You can Use Publish to web feature. ...READ MORE

answered Sep 28, 2018 in Power BI by Kalgi
• 52,350 points
1,437 views
0 votes
1 answer

What are the components I need to excel to become a pro in power BI

Having knowledge about these topics is a must.  Power ...READ MORE

answered Oct 8, 2018 in Power BI by Kalgi
• 52,350 points
873 views
0 votes
1 answer

Calculated column with the sum of values from many columns in a row

Hi, You can create a new column by ...READ MORE

answered Mar 14, 2019 in Power BI by Cherukuri
• 33,030 points
2,684 views
+2 votes
2 answers

Count text values from different columns

You can try duplicating the category columns ...READ MORE

answered Aug 29, 2019 in Power BI by anonymous
• 33,030 points
1,384 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP