Hi @damoako.
As with many things in Power BI, there are often multiple solutions to a problem. Here’s one:
After added the Enterprise DNA Extended Date Table as a [Dates] table and marking it as such, a single measure using SWITCH-TRUE was used to calculate the next refresh date:
Next Refresh Date =
VAR _LastRefresh = SELECTEDVALUE( Refreshes[Last Refresh Date] )
VAR _Frequency = SELECTEDVALUE( Refreshes[Update frequency] )
VAR _Result = SWITCH( TRUE(),
ISBLANK( _LastRefresh), BLANK(),
_Frequency = "Yearly", _LastRefresh + (365 / 1),
_Frequency = "Quarterly", _LastRefresh + (365 / 4),
_Frequency = "Monthly", _LastRefresh + (365 / 12),
BLANK()
)
RETURN
_Result
This solution handles the yearly, quarterly, and monthly frequencies mentioned in your issue. Additional conditions/calculations can be added to the SWITCH-TRUE statement to handle other frequencies as desired.
Hope it helps.
Greg
eDNA Forum - Next Refresh Date.pbix (149.7 KB)