Forum Discussion
How can i group after summarize
- 3 years ago
Built 2 calculated columns and one measure in the data model given.
Columns on tabWorker:
Training Hours Per Worker = CALCULATE( SUM( tabData[Hours] ) )TotalHrs Label = SWITCH( TRUE(), tabWorker[Training Hours Per Worker]<=20, "<=20", tabWorker[Training Hours Per Worker]<30, "<30", tabWorker[Training Hours Per Worker]>=30, ">=30" )Measure:
Worker Cnt = COUNTROWS( tabWorker )give it a thumbs up and accept as solution if this helps!
It's easier when you have a different table with columns badgeID and summed hours per worker. You can create a table like this:
ADDCOLUMNS(
SUMMARIZE(
Records,
Records [badgeID]
),
"TotalHrs",SUM(Records[Hours])
)
Then I'd just create a calculated column to lable each worker with values you mentioned (e.g. <=20)
YourColumns =
SWITCH(
TRUE(),
Table[TotalHrs]<=20, "<=20",
Table[TotalHrs]<30, "<30",
Table[TotalHrs]>=30, ">=30",
)
Thk you YukiK for your time.
That's not quite.
without wishing to waste your time i share my pbix and source:
https://1drv.ms/u/s!AgewLjPenPlMi99JTVSFLze50JbHyg?e=4BXUmI
(i'm not able to attach any file)
everything is working fine, but i'm stuck in that measure: how many workers by Total Training hours category
Again, thk U YukiK
- YukiK3 years ago
Impactful Individual
Built 2 calculated columns and one measure in the data model given.
Columns on tabWorker:
Training Hours Per Worker = CALCULATE( SUM( tabData[Hours] ) )TotalHrs Label = SWITCH( TRUE(), tabWorker[Training Hours Per Worker]<=20, "<=20", tabWorker[Training Hours Per Worker]<30, "<30", tabWorker[Training Hours Per Worker]>=30, ">=30" )Measure:
Worker Cnt = COUNTROWS( tabWorker )give it a thumbs up and accept as solution if this helps!