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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jtemes
Helper I
Helper I

MONTH AGGREGATOR TO BE THE CLOSING BALANCE

Hi all

I have a table with daily balances. I would like to create a measure that, when I show the values in a matrix per day, it shows me the daily balance and, when I show the balances by month, it shows the closing balance for the month, instead of the aggregation of the daily balances.

Can you please help me with this?

Thanks

1 ACCEPTED SOLUTION
BiNavPete
Resolver III
Resolver III

Hi @jtemes 

Take a look at the PBIX here.
The DAX reads

Balance = 
        CALCULATE(MAX(Balances[DailyBalance]),Dates[Date]=Max(Balances[BalDate]))

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Happy to help!!

Pete
Web: https://binavigation.com
Linked In: https://www.linkedin.com/in/pete-smith-955b73181

 

View solution in original post

4 REPLIES 4
BiNavPete
Resolver III
Resolver III

Hi @jtemes 

Take a look at the PBIX here.
The DAX reads

Balance = 
        CALCULATE(MAX(Balances[DailyBalance]),Dates[Date]=Max(Balances[BalDate]))

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Happy to help!!

Pete
Web: https://binavigation.com
Linked In: https://www.linkedin.com/in/pete-smith-955b73181

 

Great! Thank you very much for your help!

PoweredOut
Resolver I
Resolver I

How does your table structure look? How do you get to the closing balance amount?

 

 

 

It is quite simple, there are two columns, one with the date and the other with the balance. Additionally, there is a calendar table with a relation to the date column

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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