Forum Discussion
Finding first sum over 100
- 7 years ago
Anonymous oh i thought you need id, just change the measure
First Id = CALCULATE( [Gift Amount], TOPN(1, FILTER( Table, [Gift Amount] > [Parameter Value] ), [Gift Amount], ASC ) )
Anonymous try following measures, update column and table name as per your model.
Add what-if parameter and then it will be dynamic as it will give first fund id where amount is greater than parameter value.
Gift Amount = SUM( Table[Gift Amount] ) First Id = CALCULATE( MIN( Table[First Id], TOPN(1, FILTER( Table, [Gift Amount] > [Parameter Value] ), [Gift Amount], ASC ) )
So I created a column to calculate the sum of Gift Amount.
How are you calling "First Id" within the "First Id" column creation? It hasn't been created yet...
"First Id = CALCULATE(MIN(Table[First Id..."
Just to reiterate, I need to find the first Gift Amount > $100 for each FundID
- parry2k7 years ago
Super User
Anonymous it is a typo, change it to fundid and make sure you are adding these as measures, not columns
- Anonymous7 years agoNot applicable
I changed it to FundID and First ID is now just showing me the FundID, not an actual amount
- parry2k7 years ago
Super User
Anonymous oh i thought you need id, just change the measure
First Id = CALCULATE( [Gift Amount], TOPN(1, FILTER( Table, [Gift Amount] > [Parameter Value] ), [Gift Amount], ASC ) )