Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anon29
Helper II
Helper II

Create a biweekly/fortnighly column

Hi all, I am having trouble trying to create a biweekly/fortnightly column for a date slicer that resets itself back to "Fortnight 1". 

I want it to work similar to how the weeknum works, and it resets the fortnight back to first fortnight number after "Fortnight 26". 

Any help would be appreciated

Anon29_0-1676598247097.png

 

2 REPLIES 2
amitchandak
Super User
Super User

@Anon29 , Create week start date

 

Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)

 

Year Week Start date =

var _date = date([year]),1,1)

return

_date +-1*WEEKDAY(_date ,2)+1 

 

Bi Week number =

quotient(datediff([Year Week Start date], [Week Start date], day),14) + 1

 

Bi Week Start Date=

[Year Week Start date] * 14 ([Bi Week number]-1)

 

For this vs last follow rank as week

 

Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8

Thanks for your help @amitchandak but this variable keeps giving me an error saying incorrect syntax.

var _date = date([year]),1,1)

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.