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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
dcrow5378
Resolver I
Resolver I

Change Measure in Matrix based on Month Column (Actual & Forecast)

Hello,

I am trying to create a matrix that will switch based on Month Slicer Selection.  If a month is selected in the slicer, it will display the selected month and the prior 5 months of Actual.  It will also display to the right of selected month, the forecast values for the next 6 months.
Any insights into how to solve this is much appreciated!

 

Simplified Data Table:

dcrow5378_1-1738172383518.png

 

Month Selected in Slicer: Dec-24
Desired Matrix Output:

dcrow5378_2-1738172404978.png

 




6 REPLIES 6
DataInsights
Super User
Super User

@dcrow5378,

 

Check out the solution below. Let me know if you encounter any issues adapting it to your model.

 

https://community.fabric.microsoft.com/t5/Desktop/One-Measure-for-Actuals-Forecast-depending-on-mont... 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks @DataInsights!  Would it be possible to have a a month with two entries like so?

dcrow5378_1-1738183189633.png

 

 

@dcrow5378,

 

Are those partial months in each Jan-25 column? Would the user select a day rather than a month, or is it based on the latest date with actuals (and the remainder is forecast, which means forecast would need to be allocated if it's at the month grain).





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




It would just be that if Jan-25 was selected from Month slicer then it would show the actual and forecast.  The month is not yet closed for January, so we would need to see actual state as of now and the forecast for the month.  I am only using month in date tables as everything will roll up to the month, no day granularity.
Is that what you are asking?
The forecast data will not change, it is forecasted out for the year, but the January Actual column could change with daily refreshes.

@dcrow5378,

 

We can adjust the DAX to show actuals through the latest date that they exist. Examples using a slicer based on a disconnected MonthYear table (no relationships since that would restrict the matrix to the selected MonthYear):

 

Select Jan-25. If actuals exist through 2025-01-28, then display actuals through 2025-01-28.

Select Dec-24. If actuals exist through 2024-12-31, then display the full month of actuals.

 

Displaying Jan-25 as two separate columns in the same matrix (2025-01-01 through 2025-01-28 actuals, and 2025-01-29 through 2025-01-31 forecast) doesn't work in my testing (I'll circle back if I figure out a way).





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




So this will never be a day situation, always a month rollup.  So if the month selected is current month (January) show all January in Actual, and Forecast is already set for each full month.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors