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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
ArchStanton
Post Prodigy
Post Prodigy

Formatting Future Values in Matrix Visual Dynamically

Hi,

I've managed to successfully format future values (in RED) in my Matrix table below but not in a dynamic way, can anyone suggest a better way of doing this because I will need to manually change the conditional formatting criteria every month with the current method.

 

ArchStanton_0-1725363005267.png

Current Method uses the 3315 Original Forecast value for Aug (last month) which I would need to physically change each month:

ArchStanton_1-1725363069385.png

I'm not sure how to do this with measures.

 

The existing ones are:

Actual incl Projected = SUM(Modelling[Cumulative])
% Difference = 
([Actual incl Projected]-[Original Forecast]) / [Last Value Forecast]
Original Forecast = 
    VAR _firstdate = 
            CALCULATE(MIN('Total Closures'[Month]),
            FILTER('Modelling','Modelling'[Forecast] <> BLANK() )
            )
    RETURN
        CALCULATE(
                MIN('Modelling'[Forecast]),
                FILTER ('Modelling', Modelling[Month] = _firstdate)
        )

 

Last Value Forecast = 
    VAR _lastdate = 
            CALCULATE(MAX('Total Closures'[Month]),
            FILTER('Modelling','Modelling'[Forecast] <> BLANK() )
            )
    RETURN
        CALCULATE(
                MAX('Modelling'[Forecast]),
                FILTER ('Modelling', Modelling[Month] = _lastdate)
        )

 

Modelling Table:

                          Original Forcast

ArchStanton_2-1725363714957.png

 

Can anyone help?

Thanks

2 ACCEPTED SOLUTIONS
v-cgao-msft
Community Support
Community Support

Hi @ArchStanton ,

Please create a new measure and use it as the conditional format for both fields:

 

Measure = 
VAR __pre_month = EOMONTH(TODAY(),-2) + 1
VAR __cur_month = MIN(Modelling[Month])
VAR __pre_month_original_forecast = CALCULATE([Original Forecast],'Modelling'[Month]=__pre_month)
VAR __pre_month_diff = CALCULATE([% Difference],'Modelling'[Month]=__pre_month)
VAR __formmat = IF( __cur_month > __pre_month && [Actual incl Projected] > __pre_month_original_forecast && __pre_month_diff <= 1, "Red") 
RETURN
__formmat

 

vcgaomsft_0-1725417666807.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

Many thanks, this works perfectly! 😊

View solution in original post

2 REPLIES 2
v-cgao-msft
Community Support
Community Support

Hi @ArchStanton ,

Please create a new measure and use it as the conditional format for both fields:

 

Measure = 
VAR __pre_month = EOMONTH(TODAY(),-2) + 1
VAR __cur_month = MIN(Modelling[Month])
VAR __pre_month_original_forecast = CALCULATE([Original Forecast],'Modelling'[Month]=__pre_month)
VAR __pre_month_diff = CALCULATE([% Difference],'Modelling'[Month]=__pre_month)
VAR __formmat = IF( __cur_month > __pre_month && [Actual incl Projected] > __pre_month_original_forecast && __pre_month_diff <= 1, "Red") 
RETURN
__formmat

 

vcgaomsft_0-1725417666807.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Many thanks, this works perfectly! 😊

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.