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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.