Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I am looking to use a matrix table to total hours worked by week for the current month, but then also have a column for the current YTD hours for that employee, as well as the prior YTD hours for that employee. I have measures for the hours, CYTD hours and PYTD hours, but if I put all 3 measures into the matrix, it adds in the columns for the CYTD and PYTD for each week, but I only need those to show as totals. I've tried various methods (see links below) and can't get them to work. Every time I use SelectedValue, Max, or FirstNonBlank, it does not work. It seems my only option is to hide the columns, which is really not an option at all because this table needs to be automatically updated, not wait for someone to fix it cosmetically each week. Any help would be very much appreciated - if basic Power BI does not work, maybe someone knows of another matrix visual out there that could work?
Thank you!!
Solved! Go to Solution.
Hi @ecarroll
I created a simple sample data to do the test for your reference. In sample data, the data is from 1/1/2024 to today and there is only one employee with ID 1.
My sample:
I created the following measure to calculate CYTD.
CYTD = CALCULATE(SUM('Table'[workhours]), FILTER(ALL('Table'), [Date] >= DATE(2024, 1, 1) && [Date] <= TODAY()))
Output:
If this sample data is structurally different from the one you are using, please provide some sample data and the results based on sample data so that I can better help you. How to provide sample data in the Power BI Forum - Microsoft Fabric Community Or show them as screenshots or pbix. Please remove any sensitive data in advance. If uploading pbix files please do not log into your account.
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ecarroll
I created a simple sample data to do the test for your reference. In sample data, the data is from 1/1/2024 to today and there is only one employee with ID 1.
My sample:
I created the following measure to calculate CYTD.
CYTD = CALCULATE(SUM('Table'[workhours]), FILTER(ALL('Table'), [Date] >= DATE(2024, 1, 1) && [Date] <= TODAY()))
Output:
If this sample data is structurally different from the one you are using, please provide some sample data and the results based on sample data so that I can better help you. How to provide sample data in the Power BI Forum - Microsoft Fabric Community Or show them as screenshots or pbix. Please remove any sensitive data in advance. If uploading pbix files please do not log into your account.
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
74 | |
73 | |
56 | |
38 | |
31 |
User | Count |
---|---|
83 | |
64 | |
63 | |
49 | |
45 |