Forum Discussion
Jonnokc
10 years agoFrequent Visitor
DAX function to count specific text values from a column
Hello, How I am trying to total a specific value from a column. The column contains multipe values and I want to know the count for a specific value. The COUNTA function just totals every bla...
- 10 years ago
You need to write a formula like which will count all the rows containing "This Value"
CountValues = CALCULATE ( COUNTROWS ( TableName ); TableName[ColumnName] = " This Value " )
chauhai
8 years agoRegular Visitor
I found a workaround to the issue in trying to replicate the countif functionality of excel
I had a file like this:
| Date | Project |
| 1/08/2017 | XYZ |
| 2/08/2017 | XYZ |
| 3/08/2017 | XYZ |
| 4/08/2017 | XYZ |
| 5/08/2017 | XYZ |
| 6/08/2017 | XYZ |
| 1/09/2017 | ABC |
| 2/09/2017 | ABC |
| 3/09/2017 | ABC |
| 4/09/2017 | ABC |
| 5/09/2017 | ABC |
| 6/09/2017 | ABC |
| 12/10/2017 | DEF |
| 13/10/2017 | DEF |
| 11/11/2017 | IJK |
Step 1 : Duplicate the table in power BI as separate table
Step 2 : "Group By" on "Projects" field by "count rows", this will summarize the table
Step 3 : Using the "Lookup" function in the original table, crreate a calculated column, there you go you'll have your field in power BI
Hope this helps.