Forum Discussion
What am i doing wrong
- Anonymous9 years ago
Scoringskans =
DIVIDE (
CALCULATE ( COUNTROWS ( Project ); Project[StageName] = "Order" );
CALCULATE (
COUNTROWS ( Project );
Project[StageName] = "Order"
|| Project[StageName] = "Lost Order"
|| Project[StageName] = "Bid Made"
|| Project[StageName] = "Prospect"
)
)Take note that in my example I have 1 line for "Other" which I don't include in my formula so I have 6/12 = 0,5 which is correct.
Apparently your formule doesn't work either however there is a bigger chance that i did something wrong.
Can you tell me what it is ?
ScoringsKans2 = CALCULATE(DISTINCT(Project[Stagename]);Project[Stagename] = "ORDER")/(CALCULATE(COUNT(Project[Stagename]);Project[Stagename] ="Lost Order")+CALCULATE(COUNT(Project[Stagename]);Project[Stagename] ="Order")+CALCULATE(COUNT(Project[Stagename]);Project[Stagename] ="Prospect")+CALCULATE(COUNT(Project[Stagename]);Project[Stagename] ="Bid Made"))
The error reads: "The function COUNT takes an argument that evaluates to numbers or dates and cannot work with values of type String."
COUNT doesn't count string types of cells. Instead use COUNTA