← [[Automated Notes|Intro]] ⦿ [[Prerequisites]] ⦿ [[Create a daily note|Create]] ⦿ [[Daily note with Time Tracking|Track]] ⦿ [[Weekly Notes|Weekly]] ⦿ [[Dynamic content|Dynamic]] ⦿ [[Reports|Reports]] ⦿ Samples →
## Dynamic content
Enabling Dataview allows you to have dynamic, data-derived content in your notes.
### Config
Enable Dataview in the Community plugins, then ![[Gear24.svg]] in Dataview settings, and enable the first 5 settings:
![[Dataview Settings.png]]
Add this line to any Daily note:
```
[Hours:: `=round(dur(date(choice(this.end_time, this.end_time, dateformat(date(now),"HH:mm")),"HH:mm")-date(choice(this.start_time, this.start_time, dateformat(date(now),"HH:mm")),"HH:mm")).hours - this.breaks, 1)`] [Breaks:: `=this.breaks`] [Hol:: `=this.holiday`] [Vac:: `=this.vacation`]
```
You'll now see a summary of the day's hours, breaks, holiday, vacation.
![[Hour summary.png|300]]
To get this into the daily notes, add it to `Templates/daily.md` between the first header and the forward/back nav. Now whenever you create a new Daily note, you'll get the hours summary!
Sometimes the content of the note will be processed by Dataview before the note is done populating, and you'll see something like this:
![[Race condition.png|400]]
In that case, just navigate back and forward and the formulas will get reëvaluated.