Articles in this section
Category / Section

How to Retrieve Dates for the Last 15 Weeks in Bold BI

Published:

In Bold BI, you can easily retrieve dates for the last 15 weeks using specific expressions. This can be particularly useful when you need to analyze data over a specific period of time.

Steps to Retrieve Dates

  1. Use the DATEADD function to subtract 15 weeks from the current date. The expression should look like this:

    DATEADD(week,-15,TODAY())
    

    image.png

  2. Next, use an IF statement to compare your date value (DateVal) with the target date. If DateVal is greater than or equal to the target date, return DateVal. Otherwise, return null. The expression should look like this:

    IF([DateVal] >= [Target date], [DateVal], null)
    

    image.png

  3. Finally, remove the null value from widget filtering. This will ensure that your data only includes the dates for the last 15 weeks.

    image.png

Note: DATEADD function is supported in Microsoft SQL Server, MySQL, and Oracle data sources in Bold BI.

By following these steps, you can easily retrieve dates for the last 15 weeks in Bold BI. This can be a powerful tool for analyzing your data over a specific period of time.

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
RM
Written by Reethika Moovendhan
Updated:
Comments (0)
Please  to leave a comment
Access denied
Access denied