Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ajdm2007
Helper III
Helper III

Improving my agent card

Hello everyone,

 

The following DAX formula calculates several performance metrics for the specialists in the technical support department.

agent_card = 
VAR xNew = CALCULATE(COUNTROWS(tickets), tickets[status] = "New*")
VAR xSolved = CALCULATE(COUNTROWS(tickets), tickets[status] = ">Completed*" || tickets[Status] = ">Completed (No Email)"  || tickets[Status] = ">Closed" || tickets[Status] = ">Closed(Survey)*" )
VAR xOnhold = CALCULATE(COUNTROWS(tickets), tickets[status] = "Scheduled" || tickets[status] = "Waiting on User")
VAR xScaled = CALCULATE(COUNTROWS(tickets), tickets[status] = "Waiting on Vendor")
VAR xInProgress = CALCULATE(COUNTROWS(tickets), tickets[status] = "In Progress")
VAR xOthers = CALCULATE(COUNTROWS(tickets), tickets[status] = ">Completed*" || tickets[Status] = ">Completed (No Email)"  || tickets[Status] = ">Closed" || tickets[Status] = ">Closed(Survey)*"  || tickets[status] = "Scheduled" || tickets[status] = "Waiting on User" || tickets[status] = "Waiting on Vendor")
VAR FRTBMC =
    MAXX(
        SUMMARIZE(tickets, tickets[first_reply_time_brackets], "Count", COUNT(tickets[first_reply_time_brackets])),
        [Count]
    )
VAR FRTBMR =
    MAXX(
        FILTER(
            SUMMARIZE(tickets, tickets[first_reply_time_brackets], "Count", COUNT(tickets[first_reply_time_brackets])),
            [Count] = FRTBMC
        ),
        tickets[first_reply_time_brackets]
    )
VAR FRTBUMC =
    MAXX(
        SUMMARIZE(tickets, tickets[full_resolution_time_brackets], "Count", COUNT(tickets[full_resolution_time_brackets])),
        [Count]
    )
VAR FRTBUMR =
    MAXX(
        FILTER(
            SUMMARIZE(tickets, tickets[full_resolution_time_brackets], "Count", COUNT(tickets[full_resolution_time_brackets])),
            [Count] = FRTBUMC
        ),
        tickets[full_resolution_time_brackets]
    )
VAR formatted =
    "New: " & IF(xNew > 0, xNew, 0)  & UNICHAR(10) &
    "Solved: " & IF(xSolved > 0, xSolved, 0) & UNICHAR(13) & UNICHAR(10) &
    "On-hold: " & IF(xOnhold > 0, xOnhold, 0) & UNICHAR(13) & UNICHAR(10) &
    "Scaled: " & IF(xScaled > 0, xScaled, 0) & UNICHAR(13) & UNICHAR(10) &
    "InProgress: " & IF(xInProgress > 0, xInProgress, 0) & UNICHAR(13) & UNICHAR(10) &
	"Others: " & IF(xOthers > 0, xOthers, 0) & UNICHAR(13) & UNICHAR(10) &
    "First reply time brackets: " & FRTBMR & " | " & IF(FRTBMC>0,FRTBMC,0) & UNICHAR(13) & UNICHAR(10) &
	"Full resolution time brackets: " & FRTBUMR & " | " & IF(FRTBUMC>0,FRTBUMC,0) & UNICHAR(13) & UNICHAR(10) 
RETURN
    formatted

 

To display this calculation, I use the table visualization, which appears as follows:

ajdm2007_0-1727968294009.png

 

I would like to know your opinion on this. Do you think anything could be done to improve the presentation or even the calculation?

 

Thank you in advance, 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ajdm2007 ,

 

I would suggest trying this approach: create individual measures for each field, such as New, On-hold, etc., and then use a treemap visual to clearly display the proportion of different types within each group. Additionally, you could set up a separate bar chart or table to interact with the treemap. When a user selects any group in the treemap, the detailed numbers for each type can then be displayed.

vbofengmsft_1-1728024024463.png

 

Best Regards,

Bof

 

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @ajdm2007 ,

 

I would suggest trying this approach: create individual measures for each field, such as New, On-hold, etc., and then use a treemap visual to clearly display the proportion of different types within each group. Additionally, you could set up a separate bar chart or table to interact with the treemap. When a user selects any group in the treemap, the detailed numbers for each type can then be displayed.

vbofengmsft_1-1728024024463.png

 

Best Regards,

Bof

 

 

Hello @Anonymous 

 

It's a great idea.

 

Thank you so much.

 

Have a wonderful Friday.

 

Greg_Deckler
Community Champion
Community Champion

@ajdm2007 I would definitely see if you could align all of the numbers in a single column left-justified and then, if possible right-justify the category text. You might be better off with using an Enter Data query to create a table of your categories and then revise your measure to just return the numbers for each category. Then you could use a compact table format and have a lot more control over your formatting, colors, etc.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hello @Greg_Deckler,

 

Thank you for your reply.

 

I'm not sure how to address your suggest.

 

Could you show me a little an example?

 

Thanks again.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors