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
Anonymous
Not applicable

YoY change in matrix table when there is data missing for certain months

Hello,

 

I have financial data for several locations for both 2018 and 2019, there are certain locations that have missing data for certain months. I've created a few measures that combined show YoY change when there is both 2018 and 2019 data for that month, and display blank values when one or the other is missing. 

RPY = CALCULATE('Metric Select'[SelectedMetric],SAMEPERIODLASTYEAR(dimdate2[Date]))
 
DIFF = IF(CALCULATE('Metric Select'[SelectedMetric] - [RPY]) ='Metric Select'[SelectedMetric],BLANK(),CALCULATE('Metric Select'[SelectedMetric] - [RPY]))
 
YOY% = DIVIDE([DIFF],[RPY],BLANK())
 
This is what they look like in a matrix:
 
matrixissue.png
The issue I am having is that the aggregate % change of 24.84% for 2019, is taking into consideration Jan and Feb 2019 data when calculation % change. I do not want those included in the aggregation because we did not have jan and feb data for 2018, I only want to find aggregate % change for months where we had data for both 2018 and 2019. The row level calculation in the matrix is displaying correctly by showing blank % change values for Jan and Feb, but the aggregation is not filtering correctly.
 
Any help would be great
2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

ISINSCOPE should help you in your scenario.

Measure = IF(ISINSCOPE(Dimdate[Date].[Month]),[PY],BLANK())

Capture.PNG

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Thanks for the reply! This seems to just produce a blank value for the aggregate? I'm trying to get the correct aggregate to display -- that is one that takes into account only months that have data for both years.

 

 

Thanks again, and let me know if you have any ideas

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.