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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors