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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Community,
I’m trying to calculate % of Status Duration per Agent in Power BI.
I have a table visual with the following columns:
Date
Supervisor
Agent Name
Primary Status
Secondary Status
Status Duration (Seconds)
% of Status Duration (Expected Output)
My goal is:
✅ When I select multiple agents in filters, the percentage for each agent should total 100% independently, not combined.
If I filter two agents — Agent 4 DEV and Agent 4 QA:
Date Supervisor Agent Secondary Status Status Duration (s) Expected %
| 2025-09-15 | Cristina | Agent 4 DEV | Available | 47,640 | 87.02% |
| 2025-09-15 | Cristina | Agent 4 DEV | Spec Proj | 6,799 | 12.98% |
| 2025-09-15 | Cristina | Agent 4 QA | Available | 246 | 79.87% |
| 2025-09-15 | Cristina | Agent 4 QA | Spec Proj | 62 | 20.13% |
Each agent should sum to 100% individually, even when multiple are visible.
Date, Division, Group, Work Team, Manager, Supervisor, Agent, Employee ID, Primary Status, Secondary Status.
How can I calculate
% of Status Duration = Status Duration / Total Duration (per agent)
so that each agent’s statuses sum to 100% independently, even when multiple agents are visible or filtered?
Solved! Go to Solution.
@manoj_0911 assuming the output I shown is what you are looking for, use following DAX measures: please change name as per your needs:
//create a base measure total duration
Sum Total Duration (Parv) =
SUM ( AG2_STATUS_SUBHOUR_V[TOTAL DURATION] )
//% measure for each agent
% of Status Duration (Parv) =
DIVIDE (
[Sum Total Duration (Parv)],
CALCULATE (
[Sum Total Duration (Parv)],
ALLSELECTED (),
VALUES ( PERSONS_V[AGENT] )
)
)
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@manoj_0911 Well, years of experience working with DAX. Not sure what else to tell - people don't pay attention to modelling and basics of DAX (row and filter context), once you have a handle on that, then it is a matter of time and you will get the hang of it.
ChatGPT - I haven't tried, and not sure how it will work until it knows the full context, when I say context, meaning understanding the model and how data is getting visualized. There are many moving components. That's why when I provide a solution, I don't jump on it until I have the full picture. On the surface, this all looks easy, and a lot of people jump on the solution. As my first reply to your post was, please share a sample PBIX, although I could have provided you with the solution by reading your post, but not without knowing the full details.
Sorry for the long reply, just sharing the process and building blocks to solve the issue. 🙂
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Thanks a lot!
@manoj_0911 sure, basically for the denominator with allselected function, we are getting the sum of total hours of all selected, and then we are applying the agent filter back using the values function so that we get total hours of the agent in the context. I hope it is clear. Let me know if you need further clarification.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Thank you so much where do you learn these, i was digging deep in chatgpt for hours but the solution it gave didnt work.
@manoj_0911 assuming the output I shown is what you are looking for, use following DAX measures: please change name as per your needs:
//create a base measure total duration
Sum Total Duration (Parv) =
SUM ( AG2_STATUS_SUBHOUR_V[TOTAL DURATION] )
//% measure for each agent
% of Status Duration (Parv) =
DIVIDE (
[Sum Total Duration (Parv)],
CALCULATE (
[Sum Total Duration (Parv)],
ALLSELECTED (),
VALUES ( PERSONS_V[AGENT] )
)
)
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
how to explain this technically
@manoj_0911 is this the output you are looking for, given the current selection of two agents:
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
yes , how you did this , please share
@manoj_0911 It will be easier if you share pbix file using one drive/google drive with the expected output. Remove any sensitive information before sharing.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!