Forum Discussion
Anonymous
7 years agoNot applicable
Flag data at Certain Threshold
Hello - I am looking for some quick help here to meet a tight deadline. I am looking to flag certain customers in my data set once their aggregate $ amount hits a certain threshold (in this case $3,...
parry2k
7 years agoSuper User
Anonymous you can add index column in power query and then it is easy
Flagged 1 = VAR __value =
CALCULATE( SUM( Table7[$ Value] ),FILTER( ALLEXCEPT(Table7, Table7[Customer] ),
Table7[Date] <= MAX( Table7[Date] ) &&
Table7[ContractIndex] <= MAX( Table7[ContractIndex] )
)
) RETURN IF( __value > 3500, "Y" )
Anonymous
7 years agoNot applicable
parry2k thank you. I have adjusted the measure, however it is taking forever to run so I am not sure this solution will work for me if it continues to take this long.
- parry2k7 years agoSuper User
Anonymoustry following changes and see if it performs better
Flagged = VAR __date = MAX( Table7[Date]) VAR __contractIndex = MAX( Table7[ContractIndex] ) VAR __value = CALCULATE( SUM( Table7[$ Value] ), ALLEXCEPT(Table7, Table7[Customer] ), Table7[Date] <= __date, Table7[Contract] <= __contractIndex ) RETURN IF( __value > 3500, "Y" )