Counting the text values

0 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 in Power BI by anonymous
38 views

2 answers to this question.

0 votes

Hi!

Create a column using contains( ) like below.

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

answered Aug 29 by anonymous
• 31,840 points
0 votes
To get the count of only yes, use this Dax.

Yes_count = IF('29Aug'[Flag]=="Yes",1,0)
answered Aug 29 by anonymous
• 31,840 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 in Power BI by Upasana
• 8,550 points
322 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
• 42,510 points
27 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
• 42,510 points
177 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
• 42,510 points
198 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
• 42,510 points
72 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
• 42,510 points
64 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
• 42,510 points
63 views
0 votes
1 answer
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 in Power BI by Cherukuri
• 31,840 points
61 views
0 votes
2 answers

Count text values from different columns

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

answered Aug 29 in Power BI by anonymous
• 31,840 points
51 views