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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Puja
Helper III
Helper III

Date challenge

Hello All,

This below measure is working fine. 

DateValue =
VAR Rank_ = Divide(CEILING([Rank)],6),6,0)
Return
TODAY() -1 + Rank_

How can I exclude weekends ?

for example, if Saturday gets rank 4, then it should be assigened to monday , if sunday gets rank 5 then it should be aligned with Tuesday. 

Thanks in advance.

3 REPLIES 3
Anonymous
Not applicable

Hi @Puja ,

 

Please try this measure.

DateValue =
VAR Rank_ = Divide(CEILING([Rank)],6),6,0)
VAR BaseDate = TODAY() - 1 + Rank_
VAR DayOfWeek = WEEKDAY(BaseDate, 2)
RETURN
    IF(
        DayOfWeek = 6, BaseDate + 2,
        IF(DayOfWeek = 7, BaseDate + 1, BaseDate)
    )

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Hi @Anonymous , Thanks for looking into it.

This solution is working only for the current week. But it is adding monday and tuesday twice in the next week.  Please see below

Puja_0-1688828428402.png

 

Anonymous
Not applicable

Hi @Puja ,

 

I'm sorry I don't quite understand what you mean.

Please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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