AppAlloy Documentation
Home
  • Glossary
  • 🚀Getting Started
    • Introduce AppAlloy Documentation
    • Build your first AppAlloy app
    • From sheet to app
  • 🗃️Data management
    • Learn data structure
    • Set up data source
      • Integrate with Google Sheets
      • Integrate with Microsoft Excel
      • Build Alloy table
      • Upload local file
    • Manage data type
    • Ultimate guide for data sheet
  • ⚒️Manage table views
    • Design Record View
    • Design Actions
      • Update current record
      • Delete current record
      • Delete many records
      • Create record
      • Open external URL
      • HTTP Request
      • Open phone call popup
      • Open SMS Popup
      • Open email popup
      • Send notification
    • Design Record Components
      • Plain Text
      • Phone number
      • Email
      • URL
      • Map
      • Barcode
      • Checkbox
      • Number
      • Currency
      • Rating
      • Voting
      • Date time
      • Relative date
      • Count Down / Count Up
      • Single Photo
      • Photo Gallery
      • Carousel
      • Audio Player
      • Video Player
      • Youtube Player
      • Vimeo Player
    • Design Form View
    • Design Form fields (synced tables)
      • Text (for synced tables)
      • Number (for synced tables)
      • Date time (for synced tables)
      • Checkbox (for synced table)
      • Options (for synced table)
      • Photos (for synced table)
      • Files (for synced table)
      • Table lookup (for synced table)
      • Signature (for synced table)
    • Design Form fields (Alloy tables)
      • Single line Text (for Alloy table)
      • Long Text (for Alloy table)
      • Phone number (for Alloy table)
      • Email (for Alloy table)
      • Barcode (for Alloy table)
      • Number (for Alloy table)
      • Currency (for Alloy table)
      • Checkbox (for Alloy table)
      • Date (for Alloy table)
      • Photos (for Alloy table)
      • Files (for Alloy table)
      • Single select (for Alloy table)
      • Multiple select (for Alloy table)
      • Address (for Alloy table)
      • Table lookup (for Alloy table)
  • 🎨Manage pages
    • Manage page types
    • Design 'View From' Page
    • Page Layouts
      • List Layout
      • Grid Layout
      • Card Layout
      • Map Layout
      • Checklist Layout
      • Calendar Layout
      • Kanban Layout
    • Design Canvas View Page
    • Canvas Charts
      • Line chart
      • Area Chart
      • Pie Chart
      • Donut Chart
      • Column chart vs. Stacked Column chart
      • Bar chart vs. Stacked bar chart
      • Table
    • Design Form of... Page
  • ⚙️Manage workflow
    • Introduce Workflow
    • Design a workflow
  • 🔌Manage Integration
    • Manage AppAlloy Integration
    • Manage Slack Integration
    • Manage Gmail Integration
    • Manage Google Drive Integration
    • Manage Google Calendar integration
  • 📱Manage App Settings
    • Manage app appearance
  • 🌎App distribution
    • Publish your app
    • Use app as Mobile Web app
    • Use app on AppAlloy Air
  • 🚹Account, team, and plan
    • Manage Account
    • Manage Apps
    • Manage Users
    • Manage Plans
    • Manage Teams
  • #️⃣Learn Power FX
    • Introduce Power FX
    • Operators & Identifiers
    • Formula References
      • Average
      • Concatenate
      • Date
      • DateAdd
      • DateDiff
      • DateValue
      • DateTimeValue
      • Day
      • If
      • Month
      • Now
      • Rand
      • RandBetween
      • Round
      • RoundDown
      • RoundUp
      • Sum
      • Text
      • Today
      • Weeknum
      • Weekday
      • Year
Powered by GitBook
On this page
  • Syntax
  • Examples

Was this helpful?

  1. Learn Power FX
  2. Formula References

Weeknum

determine the week number of a given date in the year.

The WeekNum() function in Power FX is used to determine the week number of a given date in the year.

It allows you to track what week a date falls into, which is useful for reporting, scheduling, and other time-based calculations.

Syntax

WeekNum(ThisItem.DateColumn, StartOfWeek.[Weekday])
  • ThisItem.Date: A column contains the date data for which you want to determine the week number.

  • StartOfWeek.[Weekday]: Specifies which day of the week to treat as the start day.

By default, it treats Sunday as the first day of the week. But you can use the StartOfWeek enumeration:

StartOfWeek enumeration
Description

StartOfWeek.Sunday

Numbers 1 (Sunday) through 7 (Saturday). Default.

StartOfWeek.Monday

Numbers 1 (Monday) through 7 (Sunday).

StartOfWeek.MondayZero

Numbers 0 (Monday) through 6 (Sunday).

StartOfWeek.Tuesday

Numbers 1 (Tuesday) through 7 (Monday).

StartOfWeek.Wednesday

Numbers 1 (Wednesday) through 7 (Tuesday).

StartOfWeek.Thursday

Numbers 1 (Thursday) through 7 (Wednesday).

StartOfWeek.Friday

Numbers 1 (Friday) through 7 (Thursday).

StartOfWeek.Saturday

Numbers 1 (Saturday) through 7 (Friday).

Examples

Date
WeekNum( Date )
WeekNum( Date, StartOfWeek.Wednesday )

Friday, January 1, 2021

1

1

Saturday, January 2, 2021

1

1

Sunday, January 3, 2021

2

1

Monday, January 4, 2021

2

1

Tuesday, January 5, 2021

2

1

Wednesday, January 6, 2021

2

2

Thursday, January 7, 2021

2

2

Saturday, December 25, 2021

52

52

Sunday, December 26, 2021

53

52

Monday, December 27, 2021

53

52

Tuesday, December 28, 2021

53

52

Wednesday, December 29, 2021

53

53

Thursday, December 30, 2021

53

53

Friday, December 31, 2021

53

53

Last updated 7 months ago

Was this helpful?

#️⃣