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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
v-tangjie-msft
Community Support
Community Support

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
v-tangjie-msft
Community Support
Community Support

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Kudoed Authors