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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
kristel_tulio
Helper III
Helper III

Show values until recent month only in a matrix.

Hi I would like to ask for your help. I have this covenant financial report and I need to show the values only until the recent month of the current year. In my visuals I should only have values until December 2022, but it fills the whole year with the same value as the current month and the total was messed up.

I have 4 tables BS Template -Accounts - Journals - Dates 

kristel_tulio_0-1675835397532.png

Data Model

kristel_tulio_1-1675838804972.png

 

This is my measure:

 

Covenant M =
var _dummyaccount = SELECTEDVALUE('BS Template'[Items Normalize])
return
SWITCH(
TRUE() ,
_dummyaccount = "Total Assets", [Total Assets $$],
_dummyaccount = "Total Liabilities", [Total Liabilities $$],
_dummyaccount = "Total Equity",[Total Equity $$],
_dummyaccount = "Total Tangible Assets", [Total Tangible Assets],
_dummyaccount = "Net Tangible", [Net Tangible],
_dummyaccount = "In $ terms to find", [In $ terms to find],
_dummyaccount = "Tangible Asset %", FORMAT([Tangible Asset %], "0.00%"),
_dummyaccount = "Shortfall", FORMAT([Shortfall], "0.00%"),

CALCULATE([Totals])
)

 

2 REPLIES 2
kristel_tulio
Helper III
Helper III

Hi @jaweher899 

Thank you for helping! but it seems the measure is not working still. 

kristel_tulio_0-1675898930139.png

 

jaweher899
Impactful Individual
Impactful Individual

please try 

Covenant M = var _dummyaccount = SELECTEDVALUE('BS Template'[Items Normalize]) var _recentmonth = MAX('Dates'[Month]) return SWITCH( TRUE() , _dummyaccount = "Total Assets", [Total Assets $$], _dummyaccount = "Total Liabilities", [Total Liabilities $$], _dummyaccount = "Total Equity",[Total Equity $$], _dummyaccount = "Total Tangible Assets", [Total Tangible Assets], _dummyaccount = "Net Tangible", [Net Tangible], _dummyaccount = "In $ terms to find", [In $ terms to find], _dummyaccount = "Tangible Asset %", FORMAT([Tangible Asset %], "0.00%"), _dummyaccount = "Shortfall", FORMAT([Shortfall], "0.00%"),

CALCULATE([Totals], FILTER('Dates', 'Dates'[Month] <= _recentmonth)) )

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.