Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Dear all,
i am trying to create a table to view the total hours per person spend in specific weeks.
I have the project name, person, begin date, end date and time spend each day but I cant figure out how to get this in a matrix table.
Can someone assist me with it?
Hi @Teddibeer ,
I created some data:
Here are the steps you can follow:
1. In power query – Select [begin date] and [end date] – Unpivot Column.
Result:
2. Create calculated table.
Table 2 =
CALENDAR(
DATE(2023,6,1),
DATE(2023,12,31))
3. Create measure.
Measure =
var _select=SELECTEDVALUE('Table 2'[Week])
return
COUNTX(
FILTER(ALL('Table 2'),
'Table 2'[Date]>=
MINX(
FILTER(ALL('Table'),
'Table'[project name]=MAX('Table'[project name])&&'Table'[person]=MAX('Table'[person])),'Table'[Value])
&&
MAXX(
FILTER(ALL('Table'),
'Table'[project name]=MAX('Table'[project name])&&'Table'[person]=MAX('Table'[person])),'Table'[Value])
&&
'Table 2'[Week] = _select),[Date])
*
MAX('Table'[time spend each day])Measure2 =
var _table1=
SUMMARIZE(
'Table','Table'[project name],'Table'[person],"Value",[Measure])
var _table2=
SUMMARIZE(
_table1,[project name],[Value])
return
IF(
ISINSCOPE('Table'[person]),[Measure],
IF(
ISINSCOPE('Table'[project name]),
SUMX(_table1,[Value]),
SUMX(_table2,[Value])
))
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
the unpivotting of the data is causing errors all over the report
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 58 | |
| 56 | |
| 35 | |
| 18 | |
| 14 |