Forum Discussion
samroth
5 years agoMicrosoft Employee
Calculate count based on filter and if statement
I have a table with columns for branchName, stageName, date, and count of how many times that day a build from that branch successfully executed that stage. Something like this: BuildBranch ...
- 5 years ago
is there a logic that sna's count is always 1? if so you can try this.
Measure = sumx(FILTER('Table','Table'[BuildBranch]="Develop"),'Table'[Count])+CALCULATE(DISTINCTCOUNT('Table'[BuildBranch]),FILTER('Table','Table'[BuildBranch]<>"Develop"))please see the attachment
ryan_mayu
5 years agoSuper User
is there a logic that sna's count is always 1? if so you can try this.
Measure = sumx(FILTER('Table','Table'[BuildBranch]="Develop"),'Table'[Count])+CALCULATE(DISTINCTCOUNT('Table'[BuildBranch]),FILTER('Table','Table'[BuildBranch]<>"Develop"))
please see the attachment