Forum Discussion
mazzurri
6 years agoRegular Visitor
Stacked Bar Graph from time duration column
I am currently capturing my team's daily activity. I have a query for time duration of each activity (end time - start time). Right now I am plotting total duration (00:00 - 23:59). I would like to ...
- 6 years ago
hi mazzurri
For your case, you could try this way:
Create two day /night measure for Duration and two day /night measure for Ticket Count
For example:
DAY shift Duration = CALCULATE(SUM('Table 1'[Duration]),FILTER('Table 1','Table 1'[SHIFTCOLUMN]="DAY shift" ))Night shift Duration = CALCULATE(SUM('Table 1'[Duration]),FILTER('Table 1','Table 1'[SHIFTCOLUMN]="Night shift" ))Day shift Ticket Count = CALCULATE(SUM('Table 1'[Ticket Count]),FILTER('Table 1','Table 1'[SHIFTCOLUMN]="Day shift" ))Night shift Ticket Count = CALCULATE(SUM('Table 1'[Ticket Count]),FILTER('Table 1','Table 1'[SHIFTCOLUMN]="Night shift" ))Then put these measrue into visualResult:BeforeAfterand here is sample pbix file, please try it.Regards,Lin
v-lili6-msft
6 years agoCommunity Support
hi mazzurri
For your case, you could try this way:
Create two day /night measure for Duration and two day /night measure for Ticket Count
For example:
DAY shift Duration = CALCULATE(SUM('Table 1'[Duration]),FILTER('Table 1','Table 1'[SHIFTCOLUMN]="DAY shift" ))
Night shift Duration = CALCULATE(SUM('Table 1'[Duration]),FILTER('Table 1','Table 1'[SHIFTCOLUMN]="Night shift" ))
Day shift Ticket Count = CALCULATE(SUM('Table 1'[Ticket Count]),FILTER('Table 1','Table 1'[SHIFTCOLUMN]="Day shift" ))
Night shift Ticket Count = CALCULATE(SUM('Table 1'[Ticket Count]),FILTER('Table 1','Table 1'[SHIFTCOLUMN]="Night shift" ))
Then put these measrue into visual
Result:
BeforeAfter
and here is sample pbix file, please try it.
Regards,
Lin
mazzurri
6 years agoRegular Visitor
Thank you so much! That worked perfectly!
Mario