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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Days Since today

Hi,

I new to PBI and am in need of a little help

I currently have a chart that shows all orders raised Yesterday.

This works great, however on a monday I would like yesterday to include Friday- Saturday and Sunday as one day

any help would be great

thank you

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous,

 

try with this:

 

OrderRaisedYesterday :=
IF (
    WEEKDAY ( TODAY (), 2 ) = 1,
    (
        CALCULATE ( [Order], Calendar[Date] = TODAY () - 1 )
            + CALCULATE ( [Order], Calendar[Date] = TODAY () - 2 )
            + CALCULATE ( [Order], Calendar[Date] = TODAY () - 3 )
    ),
    (
        CALCULATE ( [Order], Calendar[Date] = TODAY () - 1 )
    )
)

Regards

Chiara

 

themistoklis
Community Champion
Community Champion

@Anonymous

 

Maybe a formula like the following could help.

 

This is a calculated column which returns the DayNames of the week Mon, Tue, Wed, Thu, Combined_Date

Combined_Date includes Friday, Saturday and Sunday.

When today's date is Monday it shows the daynames with the combined date otherwise all 7 daynames of the week.

 

You should then add tis column to the chart

 

I hope it makes sense:

 

Calculated Column =
IF (
    FORMAT ( TODAY (), "DDD" ) = "Mon"
        && FORMAT ( Table[Date], "DDD" ) IN { "Fri", "Sat", "Sun" },
    "Combined_Date",
    FORMAT ( Table[Date], "DDD" )
)
affan
Solution Sage
Solution Sage

Hi @Anonymous

 

Can you share some data for better understanding. Please go through this post to get your issue resolved fast.

 

 

Regards

Affan

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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