Forum Discussion
Anonymous
5 years agoNot applicable
Dax - Date Filter
Hello people, I have two measures for a date table, but for different periods: Accounting period (mm/21/yyyy to mm+1/20/yyyy) Other Periods Example: MonthAccount = 8 (06/21/...
- 5 years ago
Hi Anonymous ,
Please try this:
Measure = VAR CountMonthAccount_ = CALCULATE ( DISTINCTCOUNT ( 'Table'[MonthAccount] ), FILTER ( 'Table', 'Table'[Date] >= MIN ( 'Date'[Date] ) && 'Table'[Date] <= MAX ( 'Date'[Date] ) ) ) RETURN IF ( CountMonthAccount_ = 1, [Measure 1], [Measure 2] )Measure 1 = 1 Measure 2 = 0
v-xuding-msft
5 years agoCommunity Support
Hi Anonymous ,
Please try this:
Measure =
VAR CountMonthAccount_ =
CALCULATE (
DISTINCTCOUNT ( 'Table'[MonthAccount] ),
FILTER (
'Table',
'Table'[Date] >= MIN ( 'Date'[Date] )
&& 'Table'[Date] <= MAX ( 'Date'[Date] )
)
)
RETURN
IF ( CountMonthAccount_ = 1, [Measure 1], [Measure 2] )
Measure 1 = 1
Measure 2 = 0