Forum Discussion
RobbLewz
Helper II
6 years agoSAMEPERIODLASTYEAR with date filter
I have a view (bi.vwInvoicedTotals) with a date column as in 01/01/2019 would be 20190101 I have a date dimension with a date column as int, then the month number, full date, month name etc These a...
- 6 years ago
Hi RobbLewz
Create a measure
Measure 2 = CALCULATE ( SUM ( 'Table 3'[sale] ), FILTER ( 'date', 'date'[Date] <= EOMONTH ( DATE ( YEAR ( TODAY () ) - 1, MONTH ( TODAY () ), DAY ( TODAY () ) ), 0 ) && SAMEPERIODLASTYEAR ( 'date'[Date] ) ) )Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-juanli-msft
Community Support
6 years agoHi RobbLewz
Create a measure
Measure 2 =
CALCULATE (
SUM ( 'Table 3'[sale] ),
FILTER (
'date',
'date'[Date]
<= EOMONTH (
DATE ( YEAR ( TODAY () ) - 1, MONTH ( TODAY () ), DAY ( TODAY () ) ),
0
)
&& SAMEPERIODLASTYEAR ( 'date'[Date] )
)
)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.