Hi there ,
I have a data like
And a calculation which is sum(AmountMst) group by Voucher
And would like to have result as below
Add Sum column to the result with using Voucher=Voucher
Here is my SQL code which can give you a better idea of what I want to do.
How can I achieve this with using a measure?
Thanks.
Hi @saglamtimur,
You can create a measure like:
CALCULATE(SUM(AmountMst), ALL(TABLE[SOL]))
Just need to ignore the SOL column and keep the filter for the others.
Hey
The quickest way would be to add a calculated column to your table. Something like:
=CALCULATE( SUM( 't1'[AmountMst] ) )
This would be useful if you wanted to also filter by this column. Otherwise you could do a measure like @ricardocamargos88 has suggested. Something like:
=CALCULATE( SUM( 't1'[AmountMst] ), ALLEXCEPT( 't1', 't1'[Voucher] ) )
This will give you the total amount per voucher number.
I hope this helps.