Forum Discussion
Summarize a table in 'Add Column'
- 2 years ago
Well thanks everyone, you gave me something to chew on at least.
Jihwan_Kim you raised the point loosing any dynamic changes related to date. That is exactly the point. In this case I'm not concerned about date, only if the Project has ever been Active or Not. I have the Fact table at my disposal if its important to drill into granular monthly behavior.
Anonymous your solution works assuming that a given project only has one entry in the Fact Table, or for each entry the value is the same. But it did get me thinking, which was helpful!
In the end my solution looks like this, if the calculated table is empty, then I know there are no 'true' values indicating the project has had some activity at some point in time. Therefore we can safely assume that the project has never been active and use ISEMPTY to retern the appropriate boolean value.No Activity = VAR _projactivedays = CALCULATETABLE( 'Project Active Days Monthly', KEEPFILTERS('Project Active Days Monthly'[IsActive] = TRUE()) ) VAR _activecolumn = ISEMPTY(_projactivedays) VAR _result = IF( _activecolumn, TRUE(), FALSE() ) RETURN _result
Well thanks everyone, you gave me something to chew on at least.
Jihwan_Kim you raised the point loosing any dynamic changes related to date. That is exactly the point. In this case I'm not concerned about date, only if the Project has ever been Active or Not. I have the Fact table at my disposal if its important to drill into granular monthly behavior.
Anonymous your solution works assuming that a given project only has one entry in the Fact Table, or for each entry the value is the same. But it did get me thinking, which was helpful!
In the end my solution looks like this, if the calculated table is empty, then I know there are no 'true' values indicating the project has had some activity at some point in time. Therefore we can safely assume that the project has never been active and use ISEMPTY to retern the appropriate boolean value.
No Activity =
VAR _projactivedays =
CALCULATETABLE(
'Project Active Days Monthly',
KEEPFILTERS('Project Active Days Monthly'[IsActive] = TRUE())
)
VAR _activecolumn = ISEMPTY(_projactivedays)
VAR _result = IF( _activecolumn, TRUE(), FALSE() )
RETURN
_result