Forum Discussion
albertax
2 years agoFrequent Visitor
Return completed based upon CALCULATE(COUNTROWS)
Hi Team, I am having a bit of a trouble with a Column inside my table. I want to return the number of completed values (which should be 2); instead i am getting a very long number that is duplica...
amitchandak
Super User
2 years agoalbertax , seem like you are creating a new column. It means full table is available unless filtered
better to have a measure like
COMP =
CALCULATE (
COUNTROWS ( 'SE' ) + 0,
FILTER (
'SE',
'SE'[ModuleType] = "CCC"
),
FILTER (
'SE',
OR (
CONTAINSSTRING ( 'SE'[CompletedByName], 'Targets'[Name] ),
CONTAINSSTRING ( 'SE'[CompletedByName], 'Targets'[Alias] )
) && [Role Type] = "SHEQ"
),
FILTER ( 'Calendar', 'Calendar'[eom-date] = max('Targets'[Date] ))
)
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.