Convert Date of birth into Age in KQL

Hi there I currently have data stored as 2022-01-25 and am wanting to get out my records in brackets of say 10 yrs.
Bar/Pie Chart showing
0-7 yrs - X Clients
8-15 yrs - X Clients
16-25 - X Clients
26-35 - X Clients
35-45 - X Clients
45-55 - X Clients
55+ - X Clients

Seperately are there any good resources on how to level up my Kibana skills.

My suggestion would be to start with Lens, it's been designed to lower the barrier of entry for new users.

As for an answer to your questions, I'll do am assumption:

  1. you have a document that records the DoB for each of the clients

You can just go an chart this out in Lens by doing this:

  1. set it to Count for the Vertical Axis.
  2. Drag and drop the field where you store the DoB to the Horizontal axis. Then you click on it in the right toolbar and select "Intervals" instead of the default "Date Histogram". You should see an option there to define custom intervals.

This will give you a nice chart that plots the number of clients on a timeline based on their DoB.
If you want to go for that exact display, you would have to create a scripted field or a runtime field (a bit more complicated but it is explained nicely in the documentation) that outputs the result of "Now - DoB" pretty much. This would be the Age field, you would have to set the format for the field to "Numeric" of the type "Duration" with "Human Readable".
Then instead of using the DoB as the X axis you can use this field and do the intervals based on age.

As for resources, I suggest perusing the blogs that we post regularly. Right now there is an ongoing series that is showing how to measure the impact of influencers on chess openings using Kibana and Machine Learning. This is number 3, released this week, first parts are linked in there. Measuring the impact of YouTube chess tutorials on the use of popular openings | Elastic Blog
Another place is the documentation, we strive to make it as good as possible.
And finally, we have the Kibana Data Analyst course which you can take, that will go through pretty much everything.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.