Forum Discussion
Yrstruly2021
2 years agoHelper V
Formula To Excel
Pease give DAX for =-SUMIF(Details!B:B;'Cash Flow'!G34;Details!G:G)+4801. I have
DebtorMovements =
CALCULATE(
-SUM('ZTBR'[Amount in USD]),
'ZTBR'[Roll_Up_Function] IN {"Debtor Movements"}
) + 4801
Is this correct?
It gives me the value, but that same value then displays for all the rows, which should not be.
7 Replies
- govindarajan_dSuper User
Hi ,
Can you try like this?
DebtorMovements = CALCULATE ( - SUM ( 'ZTBR'[Amount in USD] ), KEEPFILTERS ( 'ZTBR'[Roll_Up_Function] IN { "Debtor Movements" } ) ) + 4801In your formula, it overwrites the existing filters (inc. filter context) and calculates the value. When you use KEEPFILTERS it respects the filter context.
For more info: https://www.sqlbi.com/articles/using-keepfilters-in-dax/
- Yrstruly2021Helper V
It is not suppose to list values for every row.
- govindarajan_dSuper User
Try this:
DebtorMovements= IF ( SELECTEDVALUE('ZTBR'[Roll_Up_Function])="Debtor Movements", CALCULATE (-SUM ('ZTBR'[Amount in USD]),'ZTBR'[Roll_Up_Function]="Debtor Movements")+4801, BLANK() )
- AnonymousNot applicable
Hi Yrstruly2021 ,
You can try formula like below:
DebtorMovements = CALCULATE( -SUMX( FILTER( 'ZTBR', 'ZTBR'[Roll_Up_Function] = "Debtor Movements" ), 'ZTBR'[Amount in USD] ), 'ZTBR'[Roll_Up_Function] = "Debtor Movements" ) + 4801Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.