Forum Discussion
Anonymous
6 years agoNot applicable
Set a conditional flag
Hello! I have a table where I have period wise project wise finance data. I need to set up a flag (Calculated column) Active/Inactive based on the value of one column called Turnover. The condition ...
- 6 years ago
Hi Anonymous ,
To create a calculated column as below.
flag = VAR last3month = EDATE ( TODAY (), -3 ) VAR disc = CALCULATE ( DISTINCTCOUNT ( 'Table'[Turnover ] ), FILTER ( 'Table', 'Table'[project_id] = EARLIER ( 'Table'[project_id] ) && 'Table'[Date] >= last3month && 'Table'[Date] <= TODAY () ) ) RETURN IF ( 'Table'[Date] >= last3month && 'Table'[Date] <= TODAY (), IF ( disc > 1, "Active", "Inactive" ), BLANK () )
v-frfei-msft
6 years agoCommunity Support
Hi Anonymous ,
To create a calculated column as below.
flag =
VAR last3month =
EDATE ( TODAY (), -3 )
VAR disc =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Turnover ] ),
FILTER (
'Table',
'Table'[project_id] = EARLIER ( 'Table'[project_id] )
&& 'Table'[Date] >= last3month
&& 'Table'[Date] <= TODAY ()
)
)
RETURN
IF (
'Table'[Date] >= last3month
&& 'Table'[Date] <= TODAY (),
IF ( disc > 1, "Active", "Inactive" ),
BLANK ()
)
- Anonymous6 years agoNot applicable
Hello v-frfei-msft
the data type for project nr. has changed to integer to string. and now the formula doesnt work. how can i change the formula?