Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi everyone, I have a question about a Calculate Measure.
In the next image, I have an example of the behavior that must had my Initial Balance and the Final Balance.
I must say, that I have a Fact table with the movements, and this fact table is connected to the dimensión table (Account dimension) by the account number. The important field is also "TC" (this is the kind of account).
The normal behavior of the Initial Balance is to accumulate the past years movements, but There is an Exception when the TC (kind of account) is equal to “C”, The Initial Balance for January is always Zero (because never accumulate past years) and This “TC” only acumulate the movements of the selected year.
This is the movements in the Fact Table, and I also have a dimension table for Accounts and their "TC".
This is an example of the filters in the dashboard and 4 different selections of months
Does anyone know, how to do the DAX formula to calculate the Initial Balance and the final balance?
Please provide sanitized sample data that fully covers your issue.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
I can not paste the pbix , any idea why ?
Here is some sample DAX code:
Initial Balance =
var d= min([Date])
return calculate(sum([Amount]),[Date]<d)
Final Balance =
var d= max([Date])
return calculate(sum([Amount]),[Date]<=d)
Only Super Users can attach files. Your sample data is ok, will check it later.
Hi @lbendlin
If you have time, can you help follow this thread? Thank you in advance.
Best Regards,
Community Support Team _ Jing
AccountTCKind_MovementYearMonthAmountDateChargers_January
|