Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
I Need the measure for the Output column value. I have mentioned the calculation logic for the output column. Note: For months December, January, February 2024 i have no credit and debit , so it should be blank.
Solved! Go to Solution.
Thanks for the reply from rajendraongole1, please allow me to provide another insight.
Hi @LB-Tech ,
Please try the following DAX.
Output =
VAR _tb = FILTER(ALL('Table'),'Table'[Month]<=MAX('Table'[Month]))
RETURN
SUMX(_tb,'Table'[Debit]-'Table'[Credit])+20000
Please see the attached pbix for reference.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I have solved a similar question in the attached files.
Hope this helps.
Thanks for the reply from rajendraongole1, please allow me to provide another insight.
Hi @LB-Tech ,
Please try the following DAX.
Output =
VAR _tb = FILTER(ALL('Table'),'Table'[Month]<=MAX('Table'[Month]))
RETURN
SUMX(_tb,'Table'[Debit]-'Table'[Credit])+20000
Please see the attached pbix for reference.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @LB-Tech - can you try the below measure:
Output =
VAR CurrentMonth = MAX('Table'[Month]) -- Current row's month
VAR OpeningBalance = 20000 -- Your initial balance
VAR PreviousBalance =
CALCULATE(
[Output],
FILTER(
ALL('Table'[Month]),
'Table'[Month] < CurrentMonth
)
)
VAR Debit = SUM('Table'[Debit])
VAR Credit = SUM('Table'[Credit])
RETURN
IF(
ISBLANK(Debit) && ISBLANK(Credit),
BLANK(), -- Leave blank when both Debit and Credit are blank
COALESCE(PreviousBalance, OpeningBalance) + Debit - Credit
)
Proud to be a Super User! | |
Thank you. But this not giving correct value.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
145 | |
87 | |
66 | |
51 | |
45 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |