Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
MDP0425
Regular Visitor

Dynamic bank balances, rates and dates to calculate daily overnight bank earnings

Trying to figure out how to write dax or create calculated column for overnight bank earnings based on the 2 matching criterion of date & bank. I need the date and bank to match and then conduct the calculation. I have my data model set up like below.

 

MDP0425_0-1698354815454.png

 

2 ACCEPTED SOLUTIONS
wdx223_Daniel
Super User
Super User

you can also create a date table to link both tables.

then put the date column of date and the bank of bridge table in the row

Measure=SUMX(SUMMARIZE('BankBalanceTable','BridgeTable'[Bank],'DateTable'[Date]),CALCULATE(SUM('BankBalanceTable'[Balance])*MAX('BankRatesTable'[Daily Rate])))

View solution in original post

please change all the relationship to single direction, from Bank to other two tables

View solution in original post

5 REPLIES 5
wdx223_Daniel
Super User
Super User

you can also create a date table to link both tables.

then put the date column of date and the bank of bridge table in the row

Measure=SUMX(SUMMARIZE('BankBalanceTable','BridgeTable'[Bank],'DateTable'[Date]),CALCULATE(SUM('BankBalanceTable'[Balance])*MAX('BankRatesTable'[Daily Rate])))

hey daniel - I guess I am not totally following but created the calendar bridge table and the one relationship has to be inactive. Any insight? Thank you!

MDP0425_0-1698413339599.png

 

please change all the relationship to single direction, from Bank to other two tables

Oh wow! this seems to have worked! I need to check the numbers yet, but thank you so much for your insight and expertise!

Oh yes, good idea! This calculation will get a bit more complicated as I will have accounts from the same bank that will not be earning the same rate, but this is a great idea and a push in the right direction. Thank you Daniel

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.