The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I am trying to achieve the result in the screenshot below in a Power BI Report but having trouble with the DAX. The aim is to show an aggregate Overdraft position for parent accounts by adding negative gross balances from the sub accounts in the 2nd image below.
The table below shows that the gross balance in column E adds the principal and income only (not oincluding expense) from the same account Account A, for e.g. E2 = D2 + D3. The result in F2 for Parent 1 is a sum of only the negative Gross balances E2 + E6 to compute the Net Overdraft -600. I hope this makes sense
I have created the 2 measures below to compute the result with no success so far. Any help will be greatly appreciated:
Gross Overdraft =
CALCULATE(
SUM( Table 2[Balance], FILTER(Table 2, Table 2[Type] IN {Principal, Income}
)
Net Overdraft = SUMX(Table2,
SWITCH(TRUE(),
[Gross Overdraft] < 0, [Gross Overdraft], 0)
)
Solved! Go to Solution.
Hi @aobubo85
please try
Net Overdraft =
SUMX (
SUMMARIZE ( Table2[Account], Table2[Account], "@GrossDraft", [Gross Overdraft] ),
IF ( [@GrossOverdraft] < 0, [@GrossOverdraft], 0 )
)
Hi @aobubo85
please try
Net Overdraft =
SUMX (
SUMMARIZE ( Table2[Account], Table2[Account], "@GrossDraft", [Gross Overdraft] ),
IF ( [@GrossOverdraft] < 0, [@GrossOverdraft], 0 )
)
Thank you tamerj1. This worked perfectly.
User | Count |
---|---|
25 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
28 | |
13 | |
12 | |
12 | |
6 |