JCS Analytics
JCS Analytics
  • Home
  • About
  • Privacy

JCS Analytics - We are analysts. We Ask. We Automate. We Discover.

Details
By J. Smith
J. Smith
Articles
January 6,2024
Last Updated: 03 March 2024
Hits: 1393
  • Tableau
  • DATETRUNC
  • Calculated Field

Creating a Calculated Field in Tableau to Get Get Data Aggregated by Month in the Correct Order

Creating a visualization for the most recent 12 months in Tableau can be a common requirement for time series analysis. To achieve this, you can use the `DATETRUNC` function to truncate your date data to the first day of each month, ensuring that your months will be in the correct order when aggregated. Here's how to use the `DATE(DATETRUNC('month',[Date]))` function effectively in Tableau for this purpose.

Understanding the DATETRUNC Function

The `DATETRUNC` function in Tableau truncates a given date to the specified date part, such as the year, quarter, or month. When you use `DATETRUNC('month', [Date])`, it will return the first day of the month for each date in your dataset. This is useful for creating consistent monthly data points for visualization purposes.

Steps

  1. Create a Calculated Field: In Tableau, create a new calculated field using the formula `DATE(DATETRUNC('month',[Date]))`. This will convert all dates in your dataset to the first of their respective months, without including the time along with the date. Only the date is necessary.
  2. Apply a Relative Date Filter: To focus on the most recent 12 months, apply a relative date filter to your worksheet. Add the date dimension to the filter and select 'relative date', then choose 'last twelve months'. This filter will automatically update as time progresses, ensuring that your visualization always represents the latest 12-month period.
  3. Use the Calculated Field in Your Visualization: Drag your new calculated field to the appropriate shelf (usually Columns) to use it as the axis for your visualization. This will ensure that your data is aggregated by the truncated month date, which will sort the months in chronological order.
  4. Adjust Aggregation as Needed: If you need to aggregate your data in a specific way (e.g., sum, average), make sure to adjust the aggregation settings for your measure values accordingly.
  5. Customize Your Visualization: You can now build your visualization as desired, whether it's a line chart, bar chart, or any other type that benefits from a monthly time series analysis.

Benefits of Using DATETRUNC

  • Consistency: By truncating dates to the first of the month, you ensure that each month is represented consistently, which is crucial for accurate comparisons and trend analysis.
  • Ordering: Truncated dates will naturally fall into chronological order, which is essential for time series visualizations.
  • Flexibility: You can easily adjust the level of date truncation (e.g., to quarters or years) if you need to analyze your data at a different granularity.

Using the `DATE(DATETRUNC('month',[Date]))` function in Tableau is a powerful way to prepare your data for visualizations that require monthly aggregation. It ensures that your months are in order and that your visualization reflects the most recent 12-month period. This approach is part of Tableau's robust time series analysis capabilities, which allow for insightful trend spotting and variance analysis over time.

Frequently Asked Questions

Can this method be applied to other time units (like weeks or days) and if so, how would the approach change? 
The DATETRUNC function can indeed be applied to other time units such as weeks or days. The approach remains similar, but the unit of truncation in the function needs to change (e.g., 'week' or 'day') to reflect the desired aggregation level.

How can you use the calculated field created with DATETRUNC in Tableau to compare year-over-year data? 
To compare year-over-year data using DATETRUNC, you can create separate calculated fields for the current and previous years by manipulating the date part of your DATETRUNC calculation. Then, use these fields in your visualization to compare performance across different years.

What are the best practices for ensuring that the date formatting in the calculated field matches the rest of the dashboard elements in Tableau?
Best practices for consistent date formatting include setting the default date format in the data source, using calculated fields to standardize date formats, and applying consistent formatting settings across dashboard elements directly within Tableau's format options.

 

Details
By J. Smith
J. Smith
News
March 11,2025
Last Updated: 03 November 2025
Hits: 731
  • 5K@ADA
  • Diabetes Awareness
  • Virtual 5K
  • ADA 2025
  • Physical Activity

Join the 5K@ADA Virtual Challenge to Promote Diabetes Awareness and Healthy Living

The 5K@ADA virtual 5K run/walk event is coming soon! Registration is open!

Registration is free.

The 5K@ADA Virtual Challenge will bring together people across the globe as well as ADA attendees to emphasize the need for increased physical activity to help prevent diabetes and diabetes complications. This disease awareness activity provides participants with the opportunity to raise public awareness about the importance of a healthy lifestyle in preventing and controlling diabetes.

The 5K@ADA is sponsored by Novo Nordisk and the American Diabetes Association (ADA). It takes place in conjunction with the ADA annual conference.

I do the walk on the treadmill at the gym. This way I can have my earbuds in, easily track my progress and not have any interruptions.

Upload your race time any time between the race start and end dates. 

5K@ADA Virtual Challenge
https://www.ada5k.com/
June 18 - June 22, 2025

Registration is open. Personalized bibs are available 48 hours after signup.

Continue driving change in diabetes by running or walking the 5K@ADA in Chicago or from your home city!

5K@ADA Bib

Details
By J. Smith
J. Smith
News
July 14,2024
Last Updated: 03 November 2025
Hits: 782
  • 5K@EASD
  • Diabetes Awareness
  • Virtual 5K
  • Healthy Lifestyle
  • Diabetes Prevention

Join the 5K@EASD Virtual Challenge to Promote Diabetes Awareness and Healthy Living

The 5K@EASD virtual 5K run/walk event is coming soon! Registration opens Monday July 15.

Registration is free.

The 5K@EASD Virtual Challenge will bring together people across the globe as well as EASD attendees to emphasize the need for increased physical activity to help prevent diabetes and diabetes complications. This disease awareness activity provides participants with the opportunity to raise public awareness about the importance of a healthy lifestyle in preventing and controlling diabetes.

The 5K@EASD is sponsored by Novo Nordisk and the World Diabetes Foundation. It takes place in conjunction with the European Association for the Study of Diabetes (EASD) annual conference.

I do the walk on the treadmill at the gym. This way I can have my earbuds in, easily track my progress and not have any interruptions.

Upload your race time any time between the race start and end dates. 

5K@EASD Virtual Challenge
https://www.easd5k.com/
September 7 through September 11, 2024

Registration opens July 15. Personalized bibs will be available August 7. Finisher certificates will be available September 8.

Continue driving change in diabetes by running or walking the 5K@EASD in Madrid or from your home city!

#EASD2024 #5KEASD #DiabetesAwareness #DrivingChange

Details
By J. Smith
J. Smith
News
March 14,2024
Last Updated: 03 November 2025
Hits: 656

Join the 5K@ADA Virtual Run/Walk for Diabetes Awareness 2024

Hello, fellow data analysts and fitness enthusiasts! I'm pleased to bring to your attention another fantastic opportunity to join a global movement that champions health, awareness, and community involvement: the 2024 5K@ADA Virtual Challenge!

What is the 5K@ADA?

The 5K@ADA Virtual Challenge is an inspiring event that unites people from around the world to highlight the critical importance of physical activity in preventing and managing diabetes. This event is a call to action, encouraging us to lace up our sneakers, hit our favorite trails, treadmills, or neighborhood streets, and make a significant impact in the fight against diabetes.

Why Should You Participate?

Participating in the 5K@ADA offers a unique blend of flexibility and community spirit. It's an opportunity to:

  • Raise Awareness: Every step you take helps to shine a light on diabetes, a condition that affects millions globally.
  • Stay Active: Whether you're a seasoned athlete or just starting your fitness journey, this event is a fantastic way to keep moving.
  • Join a Global Community: Connect with others who are passionate about health, wellness, and making a difference.

Event Details

  • Dates: The 5K@ADA Virtual Challenge will take place from June 19-23, 2024.
  • Registration: Open now! Don't miss the chance to be part of this impactful event.
  • Personalized Bibs: Available closer to the challenge opening date, adding a personal touch to your participation.
  • Cost: The event is free and open to everyone, regardless of fitness level.

How to Participate

  1. Enter Online: Sign up at 5K@ADA to join the challenge.
  2. Choose Your Route: Run or walk your preferred 5K route, anywhere that suits you.
  3. Track Your Time: Use any method that works for you to keep track of your time.
  4. Submit Your Time: Upload your results to the virtual results page during the submission window.
  5. Download Your Finisher Certificate: Celebrate your achievement with a downloadable certificate.

Join the Movement

The 5K@ADA is more than just a virtual run/walk; it's a powerful statement about the importance of physical activity in the fight against diabetes. By participating, you're not only taking steps for your own health but also contributing to a global cause that can change lives.

So, whether you're looking to beat your personal best, enjoy a leisurely walk, or simply support a great cause, I invite you to join the 5K@ADA Virtual Challenge. Let's come together to #DriveChangeinDiabetes and show the world what we can achieve when we unite for a common goal.

Remember, every step counts, and together, we can make a significant impact. See you at the virtual starting line!

Link to 5K@ADA Site

Frequently Asked Questions

Can I participate in the 5K@ADA event if I'm not a diabetic?  
Yes, the 5K@ADA event is open to everyone, regardless of whether you have diabetes, to promote awareness and encourage physical activity.

Are there any age restrictions for participating in the virtual events?  
The provided information does not specify age restrictions, suggesting the event is open to all ages, but it's always best to check the official event website for any age-related guidelines.

Can I walk the 5K instead of running, and does it count towards completion?  
Yes, you can either run or walk the 5K distance for these virtual events, and both are considered valid forms of participation to complete the challenge.

Are there any registration fees for the 5K@ADA virtual challenge?  
The announcement for the 5K@EASD indicates it's free to participate, but it's advisable to check the 5K@ADA's official website for any registration fee details.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

Page 8 of 8

Recent Activity

June 2026

  • Novo Nordisk IT Incident Shows Why Pseudonymized Data Still Requires Serious Protection

May 2026

  • Lundbeck’s AI Days Show How Companies Can Make AI Adoption Practical
  • Sovereign AI Infrastructure and the New Shape of AI Strategy
  • Why I Take Medical Courses as a Data Analyst

April 2026

  • Novo Nordisk Expands Its AI Strategy Through New OpenAI Partnership

Articles

  • 5K@EASD Race Results: Trends from 2023 and 2024
  • Adapting the 5K@ADA Race Results Project for 2025
  • Advanced Data Retrieval with Python
  • Aligning CGM and BGM Readings Using Python and Tableau
  • Analysis and Visualization of Public Health Agency of Canada COVID Cases
  • Bridging Data and Healthcare in the Nordics
  • Complex Web Scraping with Python
  • Creating a Calculated Field in Tableau to Get Get Data Aggregated by Month in the Correct Order
  • Data Analyst vs. Business Analyst: Similarities and Differences
  • Data Analytics for Type 2 Diabetes
  • Data Science and Responsible AI in the Pharmaceutical Industry: A Case Study of Novo Nordisk
  • Denmark's Leap into AI Innovation: A Model for Future Research and Development
  • Denmark’s Gefion AI Supercomputer Revolutionizes AI-driven Research
  • Eli Lilly’s AI Strategy: Opening High-Value Drug Discovery Models to the Biotech Ecosystem
  • Embracing AI: Balancing Augmentation, Ethics, and Environmental Impact
  • Enhancing Data Analysis and Visualization Workflows with AI
  • Exploring the 2023 5K@EASD Virtual Run: A Tableau Analysis
  • Exploring the Growth of GLP-1 RA Sales
  • How Novo Nordisk is Utilizing AI for Drug Discovery
  • How TELUS Transformed Data Analysis with Contact Center AI

Top Subjects

  • Tableau
  • Python
  • Data Analytics
  • Novo Nordisk
  • Tableau Visualizations
  • AI
  • 5K@EASD
  • Data Analysis
  • Data Visualization
  • 5K@ADA
  • Type 2 Diabetes
  • Data Cleaning
  • Data Analyst
  • Drug Discovery
  • AI Innovation
  • Quantum Computing
  • Diabetes Management
  • Race Results
  • Diabetes Awareness
  • Virtual 5K
  • SQLite
  • SQLite Database Management
  • Continuous Glucose Monitoring
  • Artificial Intelligence
  • AI in Healthcare
  • Healthcare Analytics
  • Healthcare Data
  • AI in Drug Discovery
  • NVIDIA
  • Responsible AI

Contact Me

Search

End Diabetes Stigma

5K@ADA

5K@EASD

World Diabetes Day

Rochen Web Hosting

Bluesky Social

  • You are here:  
  • Home
 
Copyright © 2026 JCS Analytics. All Rights Reserved.
Joomla! is Free Software released under the GNU General Public License.