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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
VictorCoulmont
New Member

Date table with week from saturday to friday

Hi every one, 
I currently have this Table for my dates :

DATE = ADDCOLUMNS(
    CALENDAR(DATE(2010,1,1),DATE(2025,12,31)),
    "Year",YEAR([Date]),
    "Num Mounth",MONTH([Date]),
    "Name Mounth",FORMAT([Date],"MMMM"),
    "Name Day",FORMAT([Date],"DDDD"),
    "Num Week",FORMAT([Date],"\Se\mai\ne WW") ,
    "Year Week",FORMAT ( [Date], "YYYY" ) & " - " & FORMAT(WEEKNUM([Date],21),"00"),
    "Week Number",FORMAT(WEEKNUM([Date],21),"00"),
    "Mounth Year",FORMAT([Date],"MM/ YYYY"),
    "Year Mounth",FORMAT([Date],"yyyy/mm"),
    "Day Number",WEEKDAY([Date],2)
    )

With this table my week are from monday to sunday,

I'd like to keep the same table but with my weeks from saturday to friday, i don't want new column !

Can you help me ? 

Thanks ! 
1 ACCEPTED SOLUTION
VictorCoulmont
New Member

Thanks, I Tryed and it almost works ! 
I Just changed something !
ADDCOLUMNS(
    CALENDAR(DATE(2010,1,1), DATE(2025,12,31)),
    "Year", YEAR([Date]),
    "Num Mounth", MONTH([Date]),
    "Name Mounth", FORMAT([Date], "MMMM"),
    "Name Day", FORMAT([Date], "DDDD"),
    "Num Week",
                IF(
                    WEEKDAY([Date],2) >= 6,
                    IF(
                        WEEKNUM([Date], 21) = 52,
                        1,
                        WEEKNUM([Date], 21) + 1
                    ),
                    WEEKNUM([Date], 21)
                ),
    "Year Week", YEAR([Date]) & " - " &
                    IF(
                        WEEKDAY([Date],2) >= 6,
                        IF(
                            WEEKNUM([Date], 21) = 52,
                            1,
                            WEEKNUM([Date], 21) + 1
                        ),
                        WEEKNUM([Date], 21)
                    ),
    "Week Num",IF(
                            WEEKDAY([Date],2) >= 6,
                            IF(
                                WEEKNUM([Date], 21) = 52,
                                1,
                                WEEKNUM([Date], 21) + 1
                            ),
                            WEEKNUM([Date], 21)
                        ),
    "Mounth Year", FORMAT([Date], "MM/YYYY"),
    "Year Mounth", FORMAT([Date], "yyyy/MM"),
    "Day Number", WEEKDAY([Date], 2)
)

With that it works fine ! 

 

View solution in original post

2 REPLIES 2
VictorCoulmont
New Member

Thanks, I Tryed and it almost works ! 
I Just changed something !
ADDCOLUMNS(
    CALENDAR(DATE(2010,1,1), DATE(2025,12,31)),
    "Year", YEAR([Date]),
    "Num Mounth", MONTH([Date]),
    "Name Mounth", FORMAT([Date], "MMMM"),
    "Name Day", FORMAT([Date], "DDDD"),
    "Num Week",
                IF(
                    WEEKDAY([Date],2) >= 6,
                    IF(
                        WEEKNUM([Date], 21) = 52,
                        1,
                        WEEKNUM([Date], 21) + 1
                    ),
                    WEEKNUM([Date], 21)
                ),
    "Year Week", YEAR([Date]) & " - " &
                    IF(
                        WEEKDAY([Date],2) >= 6,
                        IF(
                            WEEKNUM([Date], 21) = 52,
                            1,
                            WEEKNUM([Date], 21) + 1
                        ),
                        WEEKNUM([Date], 21)
                    ),
    "Week Num",IF(
                            WEEKDAY([Date],2) >= 6,
                            IF(
                                WEEKNUM([Date], 21) = 52,
                                1,
                                WEEKNUM([Date], 21) + 1
                            ),
                            WEEKNUM([Date], 21)
                        ),
    "Mounth Year", FORMAT([Date], "MM/YYYY"),
    "Year Mounth", FORMAT([Date], "yyyy/MM"),
    "Day Number", WEEKDAY([Date], 2)
)

With that it works fine ! 

 

rajendraongole1
Super User
Super User

Hi @VictorCoulmont  Slight modification but it works

 

DATEID =
ADDCOLUMNS(
    CALENDAR(DATE(2010,1,1), DATE(2025,12,31)),
    "Year", YEAR([Date]),
    "Num Month", MONTH([Date]),
    "Name Month", FORMAT([Date], "MMMM"),
    "Name Day", FORMAT([Date], "DDDD"),
    "Num Week", WEEKNUM([Date], 21),
    "Year Week", YEAR([Date]) & " - " &
                IF(
                    WEEKDAY(DATE(YEAR([Date]),1,1),1) > 6,
                    WEEKNUM([Date], 21) - 1,
                    WEEKNUM([Date], 21)
                ),
    "Week Number", IF(
                        WEEKDAY(DATE(YEAR([Date]),1,1),1) > 6,
                        WEEKNUM([Date], 21) - 1,
                        WEEKNUM([Date], 21)
                    ),
    "Month Year", FORMAT([Date], "MM/YYYY"),
    "Year Month", FORMAT([Date], "yyyy/MM"),
    "Day Number", WEEKDAY([Date], 2),
    "Week Start Date", [Date] - WEEKDAY([Date], 1) + 1 - IF(WEEKDAY([Date], 1) = 7, 6, 0),  -- Calculate the Saturday of the week
    "Week End Date", [Date] - WEEKDAY([Date], 1) + 7 - IF(WEEKDAY([Date], 1) = 7, 6, 0)     -- Calculate the Friday of the week
)


 

rajendraongole1_1-1716987157215.png

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.