Forum Discussion
Anonymous
7 years agoNot applicable
Flag Current QTR
Hello, I have to add a column QTR_FLAG in the table. Our FY starts in April. So, in a table(below) max YrMo will always be a previous month not a current Month. - If max year YrMo is 201809, then ...
- 7 years ago
Should be something like this if i understand correctrly:
VAR RefDate = TODAY() VAR YrMoReference = YEAR( EOMONTH( RefDate, -1 ) ) * 100 + MONTH( EOMONTH( RefDate, -1 ) ) VAR QtrReference = CALCULATE( MIN( Dates[qtr] ), ALL( Dates ), Dates[YrMo] = YrMoReference ) VAR FYReference = CALCULATE( MIN( Dates[fy] ), ALL( Dates ), Dates[YrMo] = YrMoReference ) RETURN IF( Dates[FY] = FYReference && Dates[QTR] = QtrReference, 1, 0 )
LivioLanzo
Solution Sage
7 years agoShould be something like this if i understand correctrly:
VAR RefDate = TODAY() VAR YrMoReference = YEAR( EOMONTH( RefDate, -1 ) ) * 100 + MONTH( EOMONTH( RefDate, -1 ) ) VAR QtrReference = CALCULATE( MIN( Dates[qtr] ), ALL( Dates ), Dates[YrMo] = YrMoReference ) VAR FYReference = CALCULATE( MIN( Dates[fy] ), ALL( Dates ), Dates[YrMo] = YrMoReference ) RETURN IF( Dates[FY] = FYReference && Dates[QTR] = QtrReference, 1, 0 )