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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
heshamalam
New Member

Data Presents wrongly " Last year data column appear in current year column"

Good Day, in my table I faced two problems as per the below screenshots :

1- The last year's data appear in the current year data column 

 

 

heshamalam_0-1703131159558.png

2- some data does not exist at all and it's appears

 

heshamalam_1-1703131309939.png

 

i'm using the following Dax formula:

 

1- 

Actual Current Month PTD IS = TOTALMTD([Actual Med Cell Income Statement],DATESMTD('Med Cell Actual'[Date]))
 
2- 
Actual Current Month YTD IS = TOTALYTD([Actual Med Cell Income Statement],DATESMTD('Med Cell Actual'[Date]))
 
3- 
Actual Last Year PTD IS = CALCULATE([Actual Med Cell Income Statement],SAMEPERIODLASTYEAR(DATESMTD('Med Cell Actual'[Date])))
 
4- 
Actual Last Year YTD IS = CALCULATE([Actual Med Cell Income Statement],SAMEPERIODLASTYEAR(DATESYTD('Med Cell Actual'[Date])))
 
5-  
Actual Med Cell Income Statement = CALCULATE(
    SUMX(
        'Med Cell Actual',
        'Med Cell Actual'[PTD]
    ),
    'COA'[Report] = "Income Statement"
)*-1
 
 
thank you all and appreciate your kind assistance.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @heshamalam ,

Based on the information you've provided, it seems there are two main issues with your report:

1. Last year's data is appearing in the current year data column.
2. Some data that should not be present is appearing in your report.

 

Issue 1: Last Year's Data in Current Year Column
This could be happening due to a mismatch in the date context of your report or an error in the DAX formula. To resolve this, please ensure that:
- The date table ('Med Cell Actual'[Date]) is marked as a Date table in Power BI and has a continuous date range without any gaps.
- The relationships between your date table and other tables are correctly set up.


Issue 2: Non-Existent Data Appearing
This issue might be due to incorrect filtering in your DAX formulas or an error in the data model relationships. To resolve this, please check:
- The filter context provided by 'COA'[Report] = "Income Statement" is correctly filtering the data.
- There are no issues with the data in 'Med Cell Actual'[PTD] that could be causing incorrect sums.

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @heshamalam ,

Based on the information you've provided, it seems there are two main issues with your report:

1. Last year's data is appearing in the current year data column.
2. Some data that should not be present is appearing in your report.

 

Issue 1: Last Year's Data in Current Year Column
This could be happening due to a mismatch in the date context of your report or an error in the DAX formula. To resolve this, please ensure that:
- The date table ('Med Cell Actual'[Date]) is marked as a Date table in Power BI and has a continuous date range without any gaps.
- The relationships between your date table and other tables are correctly set up.


Issue 2: Non-Existent Data Appearing
This issue might be due to incorrect filtering in your DAX formulas or an error in the data model relationships. To resolve this, please check:
- The filter context provided by 'COA'[Report] = "Income Statement" is correctly filtering the data.
- There are no issues with the data in 'Med Cell Actual'[PTD] that could be causing incorrect sums.

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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