Forum Discussion
poweruser55
Helper IV
4 years agoMultiple conditions in measure
How can I do multiple conditions in a measure? Right now I have this - Ship = calculate(count('Table1'[OLI Number]),filter('Table1','Table1'[SD (Flag)]="Y")+0, filter('Table1','Table1'[Status]="Ac...
- 4 years ago
Try the following. Only thing I wasn't sure on was what you were trying to do with the +0. Are you trying to remove blanks? I don't think it's needed with a predicate like that.
Ship =CALCULATE (
COUNTROWS ( 'Table1' )
'Table1'[SD (Flag)] = "Y",
'Table1'[Status] = "Active",
NOT ( ISBLANK ( 'Table1'[OLI Number] ) )
)
bcdobbs
Community Champion
4 years agoOk in that case you don't want to add sepearate calculates.
Instead do it all inside one calculate with a set of filters that return all possible rows including duplicates. Then use DISTINCTCOUNT of your oli column instead of COUNTROWS.
poweruser55
Helper IV
4 years agoI don't think that will work. There are overlapping filters. They have to be done separately then combined. Separate measures then a combined count of the distinct oli numbers bcdobbs