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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Different timeframe based on filter

Hi all,

I have an issue I'm stuck on. I'm writing a report that shows how a shift performed at a given manufacturing plant.

Initially I created a ShiftTable that generated a series of my 6a-6p/6p-6a starting from today's date and worked backwards then added an index column to identify how many shifts ago that was, then merged that table back to my CalendarTable and filled down the missing values.

 

That worked for the 6-6 plants, but now I have to add in plants that run on the 5a-5p/5p-5a schedule. My first thought was to create a separate ShiftTable that basically did the same thing as the 6-6 ShiftTable, then use the relationships back to my CalendarTable to filter rather than merging the table back, but I'm not entirely sure how I write in DAX "Pick this tables column if plant=X and that tables column if plant=Y"

 

Is this the right way to go about this problem? If so, any idea on how to choose which table is being used in the other measures? And if I'm going about this all wrong any suggestions on how to better address the issue?

 

Thanks in advance!

1 REPLY 1
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

Could you please provide some sample data in your fact 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. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

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

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.