Forum Discussion
jordanxie
Helper I
6 years agoConsecutive Weeks for Material
Hi, Want to create a measure to be used as a card view that counts the consecutive weeks a material is present. The format for the date is Yr-Wk# (2019-46). Let's say we are in Wk 48 so the ...
- 6 years ago
Hi jordanxie ,
You could use the following measure:
Measure = CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', VALUE ( RIGHT ( 'Table'[Yr-Wk#], 2 ) ) IN { WEEKNUM ( TODAY (), 1 ), WEEKNUM ( TODAY (), 1 ) - 1 } ) )
v-eachen-msft
Community Support
6 years agoHi jordanxie ,
You could use the following measure:
Measure =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
'Table',
VALUE ( RIGHT ( 'Table'[Yr-Wk#], 2 ) )
IN { WEEKNUM ( TODAY (), 1 ), WEEKNUM ( TODAY (), 1 ) - 1 }
)
)