Forum Discussion
Anonymous
4 years agoNot applicable
Row sum in matrix with boolean value
v-yalanwu-msft
4 years agoCommunity Support
Hi, Anonymous ;
You could create two measures about it:
count = IF(SUM([value])>0,1,0)measure =
IF (
ISINSCOPE ( 'Table'[name] ),
SUMX ( FILTER (ALL ( 'Table' ),
[name] = MAX ( 'Table'[name] )
&& DATEDIFF ( [Date], MAX ( 'Table'[Date] ), WEEK ) IN { 0, 1, 2, 3 }),
[count]),
SUMX (FILTER (ALL ( 'Table' ),
DATEDIFF ( [Date], MAX ( 'Table'[Date] ), WEEK ) IN { 0, 1, 2, 3 }),
[count] ))
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.