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! Request now

Reply
Syndicate_Admin
Administrator
Administrator

Force recalculation of a DAX formula without refreshing the data

Hello

In a table I have a column with a REFRESH-DATE and another COLOR column whose value is calculated with a DAX formula.

The COLOR column depends on whether the DATE-REFRESH column is equal to TODAY or not:

COLOR = IF(UltimoDato[Fecha]=TODAY(),"black","red")

What's the matter? The formula is not calculated if I do not do a REFRESH.

You might think "If you don't do a REFREESH the data doesn't change, why recalculate a formula then if you don't do a REFREESH?". Very easy, if in the formula we put a value that changes over time, such as TODAY(), the result of the formula can change without having to do a REFRESH. The result changes if the TODAY() value changes, which happens every day as we all know 🙂

Example:

  • We are at 2023-01-23, I assign the value 2023-01-23 to the column DATE-REFRESH
  • In this case the column COLOR = "black", because REFRESH-DATE coincides with TODAY
  • We let a day pass
  • We are at 2023-01-24, we return to the POWER-BI report
  • The value of REFRESH-DATE is still 2023-01-23, which is different from TODAY, however COLOR = "black", when what I hope is that it is "red"
  • For COLOR to be recalculated I have to do a REFRESH, but I want the formula to be recalculated without having to do said refresh

What do I want to achieve with this?

When I consult data from a database I also update a REFRESH-DATE, so I always know if the automatic refresh is working. If I look at the report and see that the REFRESH-DATE is not today's then I know that something has gone wrong and that the data are old.

In order to better detect that case, I would like the background of the card where I show DATE-REFRESH to change to RED, but since the formula is not recalculated if REFRESH is not done, the color does not change.

Any ideas?

Thank you

Amadeo

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Hello!

Worked!!!

Thanks a lot!

johnt75
Super User
Super User

You could create a measure like

Refresh date colour =
IF ( MAX ( 'Table'[Date Refresh] ) = TODAY (), "black", "red" )

 and use that in conditional formatting on the card. As it is a measure it will be calculated dynamically

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
Top Kudoed Authors