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.
CALCULATE is a multi-parameter function. You need to say
=CALCULATE(DISTINCT(Project[Stagename]);Project[Stagename] = "ORDER")/(CALCULATE(COUNT(Project[Stagename]);Project[Stagename] ="xxx")+CALCULATE(COUNT(Project[Stagename]);Project[Stagename] ="xxx")+CALCULATE(COUNT(Project[Stagename]);Project[Stagename] ="xxx")+CALCULATE(COUNT(Project[Stagename]);Project[Stagename] ="xxx"))
- RvdHeijden9 years agoPost Prodigy
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."
- Anonymous9 years agoNot applicable
COUNT doesn't count string types of cells. Instead use COUNTA
- Bokazoit9 years agoContinued Contributor
It says that the Count function will not work with string type. I used the function I put in here on my own data with a ProductId which is a number. Try to convert the stagename to an id, and I am pretty sure it will work :)