POWER BI: Modeling

Time Intelligence Functions


LASTDATE functions

Returns the last date in the given context.

Formulas:
                   LastDate_Calendar = FIRSTDATE(CalenderDate[Date])
	            
                   LastDateNonBlank = CALCULATE(SUM(TransactionData[Revenue]),
                                      LASTNONBLANK(CalenderDate[Date],SUM(TransactionData[Revenue])))
	            
                   
	            

Power BI Demo:


How to Make:
  • In Power BI Desktop create a new measure using the formulas above.
  • Under visualizations select table
  • Select or Add in the date column (i.e CalenderDate[Date]) from the calendar date table.
  • Select or Add in the new measures to the values section

Additional Comments:

Shows how LASTDATE works in different contexts. Useful when you want to calculate a Running Total or need to get the last date in a database automatically.


Dash-Intel is a Power BI and Tableau resource site for data visualization and building BI dashboards.

Data Analyst & Consultant

Copyright 2015-2023 Dash-Intel.com Terms