Forum Discussion
Divide column values every week
- 5 years ago
Hi, harmonvi
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Productivity:
Hours:
Then you need to make the week columns selected and unpivot them in Power Query.
Then you may create a measure as below.
Result = DIVIDE( DIVIDE( SUM(Hours[Value]), CALCULATE( SUM(Productivity[Value]), FILTER( ALL(Productivity), [Name] in DISTINCT(Hours[Name])&& [Week] in DISTINCT(Hours[Week]) ) ),0 ),8 )Result:
Best Regards
Allan
If this post helps,then consider Accepting it as the solution to help other members find it faster.
harmonvi if you could provided data per the links below that would be helpful. I think you are going about this the wrong way. Rather than adding more and more columns like you would do in Excel, I think I would approach this with:
- unpivoting the data in the date columns and creating a normalized table
- Have a good date table (linked to below) that would have the weekly dates marked
- Summarize and analyze your data in DAX using the Power BI model.
Right tool for the job - Power Query to shape data, DAX to analyze.
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum