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.
Had similar problems when going from Excel to DAX. As soon as you figure out the CALCULATE function you're like a newly set free bird from a cage.
your measure = CALCULATE ( DIVIDE ( DISTINCTCOUNT ( 'tableNAME'[tableCOLUMN] ) ; COUNTROWS ( 'tableNAME' ) ) ; Project[StageName] = "Order" ; Project[StageName] = "YOUR CRITERIA(S)" )
Bon apetit
How do u set the different kinds of criteria's ? are the devided bij ; or , ?
Scoringskans = CALCULATE( Divide (Distinctcount (Project[StageName]) ; countrows (Project));Project[StageName] = "Order";Project[StageName]="Lost Order" && "Bid Made" && "Order" && "Prospect")))))
This way doesn't seem to work or i made a mistake somewhere
- Anonymous9 years agoNot applicable
How many unique identities do you have in StageName column ?
If they are for example 5, then you just have to exclude the one you don't want in your calculation with
Project[StageName] <> "ID YOU DONT WANT"
Otherwise... for your 4 filtered ID's...
This should work
Scoringskans = CALCULATE( Divide (DISTINCTCOUNT(Project[StageName]) ; COUNTROWS (Project));Project[StageName] = "Order";Project[StageName]="Lost Order" ; Project[StageName]="Bid Made" ; Project[StageName]= "Order" ;Project[StageName]= "Prospect")