Forum Discussion
lea_313
Helper I
4 years agoCount based on multiple criteria
Hiya I need to calculate some counts but its proving a bit tricky Sample data below Project code ID Product for Month Year Revenue Product Header Stage 1544 Class 1 January ...
- Anonymous4 years ago
lea_313 , so you actually do want to count up the number of [Project code ID] that are active? Then I think this measure will work:
Active Project Count = SUMX( VALUES('lea_313'[Project code ID]) ,MAXX('lea_313', IF(FIND("100%", 'lea_313'[Stage], 1, 0) = 0, 1, 0)) )
Anonymous
4 years agoNot applicable
lea_313 , I believe this measure will give you the desired results:
Has Active Project =
MAXX(
'YourTable'
, VAR vStagePercentPosition = FIND("%", 'YourTable'[Stage], 1, 0) -1
VAR vStagePercent = VALUE(LEFT('YourTable'[Stage], vStagePercentPosition))
RETURN
IF(vStagePercent < 100, "Y", "N")
)lea_313
Helper I
4 years agoI get the following:
Feedback Type:
(Error)
MdxScript(Model) (47, 29) Calculation error in measure [Active Project]: Cannot convert value 'G. 100' of type Text to type Number.
My actual stage is anything that is not G.100% Delivered
Thanks