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
KLGRIZZARD
New Member

Return a column value if inside a date range set by a filter

Below laid out is the best way that I can describe what I am trying to acomplish.

 

Table Name: Projects

Project NameUserStart EndHours Per Week
Test Project #1Kiel 01/31/202202/18/202210
Test Project #2Kiel02/07/202202/18/20228

 

Table Name: Fiscal Calander (this table is every calander date with associated fiscal info)

Fiscal YearFiscal MonthFiscal WeekDate
20221101/30/2022
20221102/01/2022
2022ect....etc...etc...
20221302/18/2022

 

Would like a matrix report that somthing like this: (Using fiscal weeks as columns

(Fiscal Week ->)1234567
User        
Kiel1018180000

 

Not sure how to go about this, any help would be greatly approciated. Thanks. 

3 REPLIES 3
tackytechtom
Super User
Super User

Yes, it would, only to remove nearly all of the rows in the next step.... 

 

I think there is a way to get all weeks between two dates straight away as well.

 

Maybe you'll find something here:

Fill dates between dates with Power BI / Power Query — The Power User

 

/Tom

https://www.tackytech.blog

https://www.instagram.com/tackytechtom

 



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

tackytechtom
Super User
Super User

Hi @KLGRIZZARD ,

 

My suggestion is to "unfold" the project table so the granularity would be one row per week and project name.

 

A potential way to do this in Power Query:

1. Create dummy rows for all days between Start and End Date, i.e. by creating a Custom Column and using this code snippet:

{ Number.From([Start])..Number.From([End]) } 

2. Expand the list

3. Inner Join with your Calendar Week table to get rid of the unnecessary days.

 

Hope this helps! 🙂

 

/Tom

https://www.tackytech.blog

https://www.instagram.com/tackytechtom


 



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Would creating the additional "dummy rows" essentially duplicate the other info in that table? 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors