...

StyleCode Property: weekFormat

weekFormat

Specifies the format used to print out weeks (using thesame formatting syntax as dates).

Applies to Type Default
chart > haxis
scalar > entry > value
slicepicker > entry
summary > entry > value
table > column > value
weekFormat default

Examples

// Example: scalar > entry > value
myValue = 123

show scalar "My Scalar" a1b1 with
  myValue { value { weekFormat: "yyyy : ww" } }

// Example: slicepicker > entry
table Items = with
  [| as Id |]
  [| "A" |]
  [| "B" |]
  [| "C" |]

Items.Slice = sliceDashboard(Items.Id) by Items.Id

show slicepicker "Pick a slice" a1b3 with
  same(Items.Id) { weekFormat: "yyyy : ww" }

// Example: summary > entry > value
table Sales = with
  [| as Quantity, as NetAmount |]
  [| 10, 40 |]
  [| 2, 10 |]
  [| 1, 20 |]
    
show summary "My Summary" a1b3 with
  sum(Sales.Quantity) { value { weekFormat: "yyyy : ww" } }
  sum(Sales.NetAmount)

// Example: table > column > value
table Orders = with
  [| as Date, as Quantity |]
  [| date(2023,02,21), 150 |]
  [| date(2023,02,22), 250 |]

show table "My Table" a1c4 with
  Orders.Date { value { weekFormat: "yyyy : ww" } }
  Orders.Quantity

User Contributed Notes
0 notes + add a note