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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Solfieri
Frequent Visitor

Value disapearing when using YTD measure on Matrix visualization

Problem Description: I am experiencing an issue with a Year-To-Date (YTD) measure in Power BI. When I insert this YTD measure into a matrix visualization, the Net Income value disappears. However, when I remove the YTD aspect and display the measure without YTD calculation, the Net Income value reappears, albeit incorrect.

 

Context:

  • I have created a YTD measure called "YTDNetIncome" using the DAX formula provided.
YTDNetIncome =
CALCULATE(
    TOTALYTD(
        CALCULATE([YTDOperatingIncome] + [YTDOtherIncome]),
        'Calendar'[Date]
    ),
    FILTER(
        ALL('Calendar'),
        'Calendar'[Year] = SELECTEDVALUE('Calendar'[Year]) &&
        'Calendar'[Month] <= SELECTEDVALUE('Calendar'[Month])
    )
)
 
  • The measure sums up the YTD Operating Income and YTD Other Income for each month.
YTDOperatingIncome = TOTALYTD(CALCULATE([YTDGrossProfit]-[YTDexpense]),'Calendar'[Date])
YTDOtherIncome = TOTALYTD(CALCULATE(sum(Transactions[netamt]),Transactions[longname]="Other Income"),'Calendar'[Date])
 
  • The formula is functioning correctly in other visualizations but not in a specific matrix visualization.
Solfieri_0-1710015096384.png

  

Issue Description:

  1. YTD Measure Disappears: When I add the "YTDNetIncome" measure to the matrix, the Net Income values disappear from the visualization.
  2. Incorrect Net Income: If I remove the YTD aspect and display the raw measure without YTD calculation, the Net Income values reappear, but they are incorrect.
Solfieri_2-1710015167586.png

I would greatly appreciate any insights into why the YTD measure is behaving unexpectedly in this specific matrix visualization. Additionally, suggestions for troubleshooting or refining the DAX formula would be incredibly helpful.

Thank you in advance for your assistance!


 

 
1 ACCEPTED SOLUTION
MattAllington
Community Champion
Community Champion

It's not clear if the measure in these 2 matrix is the same. I will assume so. The existence, or not, of a second measure in a matrix cannot affect the first measure, so that is not the cause. It seems the columns in rows in both matrixes are different. This is the likely cause. I suggest you create a new blank page, add 2 matrixes containing the measure in question, then build both matrixes. Watch carefully to see what works and what causes it not to work. Then investigate what stops it working. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

Does this revised simplified measure, reolve the mystery of the disappearance?

YTDNetIncome = CALCULATE([YTDOperatingIncome] + [YTDOtherIncome],DATESYTD('Calendar'[Date])

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hello,

Unfortunately, the suggested solution did not resolve the issue. Upon inserting the YTD measures, the entire row disappears from the visualization.

 

Solfieri_0-1710125536841.png

 

Thank you for your contribution.

MattAllington
Community Champion
Community Champion

It's not clear if the measure in these 2 matrix is the same. I will assume so. The existence, or not, of a second measure in a matrix cannot affect the first measure, so that is not the cause. It seems the columns in rows in both matrixes are different. This is the likely cause. I suggest you create a new blank page, add 2 matrixes containing the measure in question, then build both matrixes. Watch carefully to see what works and what causes it not to work. Then investigate what stops it working. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Thank you, the problem was a filter. As soon as I did your solution I found out the issue. 

 

 

Hello, 
They aren't the same measure, but both measures have a similar structure as I show bellow:
1) The one that's working on income statement, and showing the right, value is built with this summary structure:

All_SummaryItems =
VAR SummaryItem = SELECTEDVALUE('Income Statement Names'[longname])
RETURN
SWITCH(TRUE(),
SummaryItem = "Income", [Revenue],
SummaryItem = "Margin Percent [%]", [Margin_Percent],
SummaryItem = "Cost of Goods Sold",[CostofGoodsSold],
SummaryItem = "Total Revenue", [Revenue],
SummaryItem = "Gross Profit", [calc_GrossProfit],
SummaryItem = "Expense", [Expense],
SummaryItem = "Operating Income", [calc_OperatingIncome],
SummaryItem = "Other Income", [OtherIncome],
SummaryItem = "EBITDA", [i_EBITDA],
SummaryItem = "Net Income", [YTDNetIncome])

2) The one that doesn't accept the YTD measure use this struture:
BS_SummaryItems =
VAR SummaryItem = SELECTEDVALUE('Transactions_Groups'[longname])
RETURN
SWITCH(TRUE(),
SummaryItem = "Bank", [Bank],
SummaryItem = "Accounts Receivable", [Accounts Receivable],
SummaryItem = "Other Current Asset", [Other Current Asset],
SummaryItem = "Other Asset", [Other Asset],
SummaryItem = "Fixed Asset", [Fixed Assets],
SummaryItem = "Accounts Payable", [Accounts Payable],
SummaryItem = "Credit Card", [Credit Card],
SummaryItem = "Other Current Liability", [Other Current Liabilities],
SummaryItem = "Long Term Liability", [Long Term Liabilities],
SummaryItem = "Equity", [Equity],
SummaryItem = "Net Income", [NetIncome]
)

3) But doing as you suggested I tried a new structure to see the results and I made a simple sum of the values in the Balance Sheet, also using a dimension table with no direct relationship with the values table, and as soon as I insert a YTD measure, the net income row disappear:
TotalBalanceSheet = CALCULATE([Total Current Assets] + [Fixed Assets] + [Other Asset] + [Total Current Liabilities] + [Equity] + [YTDNetIncome] + [Long Term Liabilities])
Thank you for your answer.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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