Forum Discussion
Data not rolling up correctly with date columns
- 1 year ago
Hi dcormiernj
Thank you for providing the details about your matrix visual setup. It sounds like you're facing an issue with the aggregation of weekly numbers when rolling up to monthly, quarterly, and yearly totals. Here are some steps and considerations to help you resolve:
Ensure that the measure for hours is set to aggregate correctly. It should be using the "Sum" function to total the hours across the weeks. If you're using a tool like Power BI.verify that the measure is defined as:measure :
Total Hours = SUM('fact Table'[Hours])If your date field is part of a hierarchy (Year > Quarter > Month > Week > Day), make sure that the hierarchy is being utilized correctly in the matrix.
Since you have a filter applied to show only Sundays, ensure that this filter does not interfere with the aggregation when rolling up to higher levels.
measure :
TotalSundayHoursFixed = CALCULATE( SUM('fact Table'[Hours]), KEEPFILTERS('Data table'[Weekday] = "Sunday") )Verify that the relationships between your date table and the fact table (where your hours data is stored) are correctly established. The date table should have a one-to-many relationship with the fact table.
If you've made changes to your data model or measures, make sure to refresh the data in your visualization tool to see the updated results.
Expected Output :for your better understanding I am attaching the sample PBIX file.
Hope this helps !If this post was helpful, please consider marking Accept as solution to assist other members in finding it more easily.
If you continue to face issues, feel free to reach out to us for further assistance!
Do you have a explict measure or implict measure? If implict check you have the aggregation set appropriately to sum, max etc as per what you want to see and not first or last. If you don't see sum etc then check your numbers are a numberic data type and not strings