Forum Discussion
Calculate minimum value over Last 12 Months
- 6 years ago
Hello Anonymous
you can't reference a measure in a Min formula. Therefore you have to recalculate you sumamount in your new min-measure using some Summarize and addcolum. Here the solution that should work for you
MinOfSumAmount = calculate( minx( ADDCOLUMNS( SUMMARIZE( 'Table'; 'Table'[Month] ); "sum"; CALCULATE( sum( 'Table'[Amount] ); filter( all( 'Table'[Month] ); 'Table'[Month]=earlier( 'Table'[Month] ) ) ) ) ;[sum] ); all('Table') )If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hello Anonymous
you can't reference a measure in a Min formula. Therefore you have to recalculate you sumamount in your new min-measure using some Summarize and addcolum. Here the solution that should work for you
MinOfSumAmount = calculate(
minx(
ADDCOLUMNS(
SUMMARIZE(
'Table';
'Table'[Month]
);
"sum";
CALCULATE(
sum(
'Table'[Amount]
);
filter(
all(
'Table'[Month]
);
'Table'[Month]=earlier(
'Table'[Month]
)
)
)
)
;[sum]
);
all('Table')
)
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Thanks Jimmy, this expression works perfectly fine with me.
- Jimmy8016 years ago
Community Champion
Hello Anonymous
your feedback is very appreciated
I'm very glad I could help you
All the best
Jimmy