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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
DustinD
Helper I
Helper I

hours on a week view

Below i have included a rough make up of my data. along the top i have numbers 1-4. this would go through 52 becasue this represents weeks in the year. this chart below is supposed to be a matrix veiw. so for this example i am on the secend level of the matrix veiw for the department assembly. this gives me 4.2 hours for week 2. i want to be able to have it display for evrey week after its start date. i do not have start date shown for this example. but in this example it would be week 2 so from week 2 on i want to see 4.2 for this item number for assembly. 

 

DustinD_0-1693942156535.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @DustinD ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1694056160706.png

(2) We can create a measure. 

Measure = 
var _a= CALCULATE(MIN('Table'[week]),FILTER(ALLSELECTED('Table'),'Table'[hours]<>BLANK() && 'Table'[Department]=MAX('Table'[Department]) && 'Table'[type]=MAX('Table'[type])))
var _b=MINX(FILTER(ALLSELECTED('Table'),'Table'[week]=_a && 'Table'[Department]=MAX('Table'[Department]) && 'Table'[type]=MAX('Table'[type])),'Table'[hours])
return IF(MAX('Table'[hours])=BLANK() && MAX('Table'[week]) <_a,BLANK(),_b)

(3) Then the result is as follows.

vtangjiemsft_1-1694056203156.png

 

If the above one can't help you get the desired result, please provide some sample data in your 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. Thank you.

 

Best Regards,

Neeko Tang

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

2 REPLIES 2
Anonymous
Not applicable

Hi @DustinD ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1694056160706.png

(2) We can create a measure. 

Measure = 
var _a= CALCULATE(MIN('Table'[week]),FILTER(ALLSELECTED('Table'),'Table'[hours]<>BLANK() && 'Table'[Department]=MAX('Table'[Department]) && 'Table'[type]=MAX('Table'[type])))
var _b=MINX(FILTER(ALLSELECTED('Table'),'Table'[week]=_a && 'Table'[Department]=MAX('Table'[Department]) && 'Table'[type]=MAX('Table'[type])),'Table'[hours])
return IF(MAX('Table'[hours])=BLANK() && MAX('Table'[week]) <_a,BLANK(),_b)

(3) Then the result is as follows.

vtangjiemsft_1-1694056203156.png

 

If the above one can't help you get the desired result, please provide some sample data in your 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. Thank you.

 

Best Regards,

Neeko Tang

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

lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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