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
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
Super User
Super User

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
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.

Top Solution Authors