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
694 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,045 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,360 points
719 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,360 points
1,157 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,360 points
1,840 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,360 points
1,360 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,360 points
814 views
0 votes
1 answer

How do I format the KPI in Power BI

format the KPI by selecting the paint ...READ MORE

answered Oct 9, 2018 in Power BI by Kalgi
• 52,360 points
1,185 views
0 votes
1 answer

How is Power BI Report Server different from SQL Server Reporting Services and the Power BI online service

Power BI report server is deployed on-premises ...READ MORE

answered Oct 15, 2018 in Power BI by Hannah
• 18,540 points
1,190 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,553 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,285 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