Forum Discussion
Anonymous
5 years agoNot applicable
Week Number Sequence
Hi, I have different dates in my PowerBi and would like to assign the dates with Week 1, Week 2. The dates go from 2019 to 2021, so I want them in a sequence - like after week 53, it should be w...
- Anonymous5 years ago
try to add a custom column using this formula:
e facce sapè
Anonymous
5 years agoNot applicable
let
Origine = List.Dates(#date(2019,1,1),365*3,#duration(1,0,0,0)),
#"Conversione in tabella" = Table.FromList(Origine, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Modificato tipo" = Table.TransformColumnTypes(#"Conversione in tabella",{{"Column1", type date}}),
#"Aggiunta colonna personalizzata" = Table.AddColumn(#"Modificato tipo", "wk", each if Date.Year([Column1])>2019 then +52*(Date.Year([Column1])-2019)+Date.WeekOfYear([Column1]) else Date.WeekOfYear([Column1]))
in
#"Aggiunta colonna personalizzata"