The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Pease give DAX for =-SUMIF(Details!B:B;'Cash Flow'!G34;Details!G:G)+4801. I have
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"
) + 4801
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi ,
Can you try like this?
DebtorMovements =
CALCULATE (
- SUM ( 'ZTBR'[Amount in USD] ),
KEEPFILTERS ( 'ZTBR'[Roll_Up_Function] IN { "Debtor Movements" } )
) + 4801
In 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/
It is not suppose to list values for every row.
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()
)
This code eliminate the assigned values to rows that shoul not have these values, but it does not give me the total like the other codes does.
Hi @Yrstruly2021 ,
Please try this:
DebtorMovements=
IF(
HASONEVALUE('ZTBR'[Roll_Up_Function]),
IF (
SELECTEDVALUE('ZTBR'[Roll_Up_Function])="Debtor Movements",
CALCULATE (-SUM ('ZTBR'[Amount in USD]),'ZTBR'[Roll_Up_Function]="Debtor Movements")+4801,
BLANK()
),
CALCULATE (-SUM ('ZTBR'[Amount in USD]),'ZTBR'[Roll_Up_Function]="Debtor Movements")+4801
)
Upvote and accept as solution if this helped!
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |