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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
arevach
Regular Visitor

Narrow query from SPO list to last 24 hours

Hi,

I connected to a list in SharePoint Online (that has a few lookup values to other lists). I wamt to create a report (Table or Matrix visualization) to show only the last 24 hours (Yesterdays 8AM to today's 8AM). how and where do i put this cretiria? 

Thanks a lot in advance,

Assaf

1 ACCEPTED SOLUTION

Hi Assaf,

 

The workaround could be adding a custom column like below. Then you only need to filter the 1 or 0.

IfLast24 =
IF (
    (
        DATEVALUE ( [Column1] ) = TODAY ()
            && TIMEVALUE ( [Column1] ) <= TIME ( 8, 0, 0 )
    )
        || (
            DATEVALUE ( [Column1] )
                = TODAY () - 1
                && TIMEVALUE ( [Column1] ) >= TIME ( 8, 0, 0 )
        ),
    1,
    0
)

Narrow_query_from_SPO_list_to_last_24_hours

 

Best Regards,

Dale

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

View solution in original post

4 REPLIES 4
v-jiascu-msft
Employee
Employee

Hi @arevach,

 

Could you please mark the proper answers as solutions?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jiascu-msft
Employee
Employee

Hi Assaf,

 

Do you have a DateTime type column?

I would suggest you import the data then add the DateTime type column in a Sclier which will be set to an interval of 24 hours. 

Can you share a sample?

 

Best Regards,

Dale

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

Hi Dale,

Thanks for the response.

I have a SPO list with Date type column Report Date. 

I would like to send a scheduled report to bunch of users of the last 24 hours , AKA Report Date Between Today and Yesterday...

I've added a filter visualization but do i set it on today or yesterday so i will be able to acheive the report of last 24 hours?

What sample do you need? 

Assaf

 

Hi Assaf,

 

The workaround could be adding a custom column like below. Then you only need to filter the 1 or 0.

IfLast24 =
IF (
    (
        DATEVALUE ( [Column1] ) = TODAY ()
            && TIMEVALUE ( [Column1] ) <= TIME ( 8, 0, 0 )
    )
        || (
            DATEVALUE ( [Column1] )
                = TODAY () - 1
                && TIMEVALUE ( [Column1] ) >= TIME ( 8, 0, 0 )
        ),
    1,
    0
)

Narrow_query_from_SPO_list_to_last_24_hours

 

Best Regards,

Dale

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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