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
Hi, I need to show the % of helpdesk tickets that are for the person creating the ticket...and the % that are on behalf of someone else. Sometimes the creator uses the "On_behalf_of" for themselves and sometimes they leave it blank, but when it's blank, it is always the same as the "Created by" entry. For example:
| Created_by | On_behalf_of | Count |
| Dave Jones | Dave Jones | 2 |
| Dave Jones | Mark Griffiths | 1 |
| Dave Jones | 4 | |
| Amy Evans | Laura Thomas | 3 |
| Amy Evans | 8 | |
| Paul Simon | Peter Jackson | 5 |
| Paul Simon | 4 | |
| Paul Simon | Gary Marks | 3 |
| Total | 30 |
I want to show as
| Created_by | For_Themself | Someone_Else |
| Dave Jones | 85.70% | 14.30% |
| Amy Evans | 62.50% | 37.50% |
| Paul Simon | 33.33% | 66.66% |
Thanks
Create a new column to determine if the ticket was created on behalf of someone else or for themselves. You can use the following DAX formula to create this column:
On_Behalf_Indicator = IF(
ISBLANK('Table'[On_behalf_of]) || 'Table'[Created_by] = 'Table'[On_behalf_of],
"For_Themself",
"Someone_Else"
)
Create a measure to calculate the percentage of tickets created for themselves:
For_Themself_Percentage =
VAR TotalTickets = CALCULATE(COUNT('Table'[Count]), ALLEXCEPT('Table', 'Table'[Created_by]))
VAR ForThemselfTickets = CALCULATE(COUNT('Table'[Count]), 'Table'[On_Behalf_Indicator] = "For_Themself")
RETURN
DIVIDE(ForThemselfTickets, TotalTickets, 0)
Create another measure to calculate the percentage of tickets created on behalf of someone else:
Someone_Else_Percentage =
VAR TotalTickets = CALCULATE(COUNT('Table'[Count]), ALLEXCEPT('Table', 'Table'[Created_by]))
VAR SomeoneElseTickets = CALCULATE(COUNT('Table'[Count]), 'Table'[On_Behalf_Indicator] = "Someone_Else")
RETURN
DIVIDE(SomeoneElseTickets, TotalTickets, 0)
Create a table visual in Power BI and add the Created_by column along with the two measures For_Themself_Percentage and Someone_Else_Percentage.
Proud to be a Super User! |
|
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |