Forum Discussion

jgalloway's avatar
jgalloway
Regular Visitor
9 years ago
Solved

Multiple LOOKUPVALUE dates

Hi all,   I'm an avid user of Excel for prototyping before moving onto Power BI or custom build dashboards, but seem to be getting stuck at something pretty simple here when moving this project on....
  • danrmcallister's avatar
    9 years ago

    Try something like this:

     

    Period Number = Calculate(sum(Periods[PeriodNum]),
    	Filter(Periods,Periods[Start] <= 
    		LASTDATE('Date'[Date].[Date])
    		&&
    		Periods[End] >= 
    		FIRSTDATE('Date'[Date].[Date])
    		)
    )

    This works so long as you're looking for a number - AFAIK this wouldn't work with text, maybe there's a different function that would work with LASTDATE/FIRSTDATE as filters though.

     

     

    Is that what you're looking for?