Forum Discussion
DAX function to count specific text values from a column
- 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 " )
Can you please let me know what is wrong with my formula?
Testing = CALCULATE(COUNTROWS(Table1);Table1[Job title] = "Associate")
hey man, where you able to fix your issue?
I am experience the same problem here, below my formula....
Somewhat Dissatisfied = CALCULATE(COUNTROWS(Raw),Raw[Sat Lv]="4")
I try using the ";" but still not working.
Any help would be nice.
- Sean10 years agoCommunity Champion
Rodrigo Measure = COUNTROWS(FILTER(Raw, Raw[Sat Lv]=4))
If for some reason 4 is not a number - use ="4"
- Rodrigo10 years agoFrequent Visitor
Sean thanks, I was able to calculate the values without any problem.
another question here....
another calc problem here, I need to calculate how many times the word "communication" appears on a column but. the word communication is part of a text inside the row. example below:
Column 1
asdfoaisdfhoasd communication sedfadsfadsfad
comunication e2erawedfasdfads
adsfqefcomunication
the asnwered should be 3 .... as the word communication appears 3 times in column A
please help. thanks
- karthik10 years agoAdvocate I
Create a calculated column in the table as follows:
HasCommunication := IF (Find("Communication",your_text_column,1,-1) = -1, 0, 1)
Create a new measure as CommunicationCount = SUM([HasCommunication]) in the same table where you created a new column "HasCommunication"