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

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

Reply
Anonymous
Not applicable

Qlik Weekstart function into DAX

Hi Team,

 

I have a qlik expression and I need to convert it into equivalent DAX.But there is no Weekstart dax available in PBI Desktop

 

if(ReportingCommitments[RPT_RequiredDate] >= Today() && ReportingCommitments[RPT_RequiredDate] <= Weekstart(Today()) + 98 && ReportingCommitments[RPT_StatusId] <> 60, "Due in 1-16 Weeks",
if(ReportingCommitments[RPT_RequiredDate] >= Today() && ReportingCommitments[RPT_RequiredDate] > weekstart(Today()) + 98 && ReportingCommitments[RPT_StatusId] <> 60, "Due in more than 16 weeks",""
))

1 ACCEPTED SOLUTION
v-cazheng-msft
Community Support
Community Support

Hi @Anonymous,

 

You may try this Calculated column.

DueInWeeks =
VAR WeekStart =
    TODAY () - WEEKDAY ( TODAY (), 3 )
VAR Condition_ =
    ReportingCommitments[RPT_RequiredDate] >= TODAY ()
        && ReportingCommitments[RPT_StatusId] <> 60
RETURN
    IF (
        Condition_
            && ReportingCommitments[RPT_RequiredDate] <= ( WeekStart + 98 ),
        "Due in 1-16 Weeks",
        IF (
            Condition_
                && ReportingCommitments[RPT_RequiredDate] > ( WeekStart + 98 ),
            "Due in more than 16 weeks",
            ""
        )
    )

 

Then, the result looks like this.

vcazhengmsft_0-1651557497437.png

 

Also, attach the pbix file as reference. Hope it helps.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

View solution in original post

2 REPLIES 2
v-cazheng-msft
Community Support
Community Support

Hi @Anonymous,

 

You may try this Calculated column.

DueInWeeks =
VAR WeekStart =
    TODAY () - WEEKDAY ( TODAY (), 3 )
VAR Condition_ =
    ReportingCommitments[RPT_RequiredDate] >= TODAY ()
        && ReportingCommitments[RPT_StatusId] <> 60
RETURN
    IF (
        Condition_
            && ReportingCommitments[RPT_RequiredDate] <= ( WeekStart + 98 ),
        "Due in 1-16 Weeks",
        IF (
            Condition_
                && ReportingCommitments[RPT_RequiredDate] > ( WeekStart + 98 ),
            "Due in more than 16 weeks",
            ""
        )
    )

 

Then, the result looks like this.

vcazhengmsft_0-1651557497437.png

 

Also, attach the pbix file as reference. Hope it helps.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

amitchandak
Super User
Super User

@Anonymous ,

 

Monday

 

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

 

 

Any Weekday Week - Start From Any day of Week
https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Power-BI-Turning/ba-p/1187482

 

Power query

Date.StartOfWeek and Date.EndOfWeek: https://www.youtube.com/watch?v=8HNicSedIds&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=104

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.