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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Remon1991
Frequent Visitor

Shows data from certain time windows

Hello,

 

I struggling how to show data from a certain time windows. And a possibility to filter this data between morning shift data, afternoon shift data and historical data.

I now have fix this question with a lot of different measures, but sometimes it's not working correctly. And i find it is to complex. There must be an easy solution for this.

 

Text in red is not in place now, but can be in the future. So i hope i can build this future proof (maby with a little ajustment).

We have different shifts:

From 06:00:00 am till 14:15:00 pm (morning)

From 14:15:00 pm till 22:45:00 pm (afternoon)

From 22:45:00 pm till 06:00:00 am (night)

 

From Thuesday to friday:

When afternoon shift start, i want to see the data from morning shift of the same day.

When morning shift start, i want to see the data from afternoon shift of the day before.

 

On monday:

When morning shift start, i want to see the data from friday morning shift from week before.

 

From Tuesday to friday:

In the future:

When night shift start, i want to see the data from afternoon shift of the same day.

When morning shift start, i want to see the data from night shift of the day before.

 

On Monday:

When morning shift start, i want to see the data from friday afternoon shift from week before.

 

There is no data in the weekends.

 

Examples:

Todays date and time is 5-6-2024 06:00 am (On monday i want to see fridays data)

Date:Outcomst

5-2-2024 14:03

Historical data
5-2-2024 16:04Historical data
5-3-2024 14:15Morning shift data

 

Todays date and time is 5-6-2024 02:15 pm

Date:Outcomst

5-2-2024 14:03

Historical data
5-2-2024 16:04Historical data
5-3-2024 14:15Historical data

5-6-2024 13:24

Morning shift data

 

Todays date and time is 5-7-2024 06:00 am

Date:Outcomst

5-2-2024 14:03

Historical data
5-2-2024 16:04Historical data
5-3-2024 14:15Historical data

5-7-2024 13:24

Historical data

5-6-2024 22:11

Afternoon shift data

 

4 REPLIES 4
dufoq3
Super User
Super User

Could you provide some sample data in usable format - not as a screenshot (if you don't know how, read note below my post) and also expected result based on sample data please?


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

I have posted sample data.

Remove unnecesary columns from sample and provide expected result based on sample data please as I asked before.


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

I have changed the data, i hope it's clear now?

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors
Top Kudoed Authors