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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AdrianLock
Helper I
Helper I

Display top 10 Longest Calls in a table

Hi I guess my lack of dax knowledge is issue here.  I need to be able to pull the 10 longest call wait times.  to display under neath a KPI.  By default the KPI does a caulation and shows the value for last month, undereath it shows previous 3 months in a line chart. 

 

What I'm struggling to do is get table below to show  Callref, Start Time,End Time , Queue time in sec, Talk time,
But broken down to show the top 10 wait times for current month.  However if one of the points on the line chart is selcted then top 10 wait times for that month should be shown instead. 

 

 Below is dax used to select the current date if not filtered.  However I then need to work out the top10 for that month.  But I'm having trouble in understanding how to get TopN to work as measure.

    IF (
        ISFILTERED ( CS_dim_CALENDAR_CallStartDate[Date] ),
        MAX ( CS_dim_CALENDAR_CallStartDate[Date] ),
        MAX ( CS_fact_Call[CallStartDate] )
    )

ps I'd love to supply a file with dataset but it has 40+different fac & dimention  tables in and is not something I can share.  I'm hoping my expliantion might help someone point me in the right direction
5 REPLIES 5
some_bih
Super User
Super User

Hi @AdrianLock  one possible solution  create CALCULATED TABLE with your TOP 10 measure and then create what else you need to final request.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






some_bih
Super User
Super User

Hi @AdrianLock it is very hard to imagine your situation without file so soution could be tricky to find.

For time (your case wanted months (3 or whatever)) measure should work smootly if you add slicer with Date columns for months. Did you try this as interaction and check results?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Hi Im not sure what you mean. If you mean add a date slicer. Unfortently we are showing Last months KPI and then previouse 3 moths as small chart undereath.  We do not want to add a date slicer on page.  

Plus I'm not sure how that would fix my issue which is primerly with how to get the table to default to top 10 longest wait calls, for last month and or change if a different month is selected.

 

Appolgies not be able to supply a pbix file, but this is a rather large dataset containg over 40+ tables and multiple Data streams.  If I could easily I would

some_bih
Super User
Super User

Hi @AdrianLock your "wait time" is probably difference for two timestamps, like stardate and enddate in some format if yes, one possible solutions is to use function DATEDIFF

https://devoworx.net/dax-datediff-powerbi/ and https://devoworx.net/dax-datediff-powerbi/ with more examples for different time periods, depending on your data type and data format. I hope this help





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Thanks for your reply perhaps I should have clarified I have waitime in field already supplied by Phone System. 
However what does not work is getting the top 10 calls for a particular month.  I currently have visual we have designed made up of the Target for last month (card), plus a line chart below showing last 3 months.  

We need it to show the current month by default or one of the other months if the data point is selected on the line chart of the top10 wait times.  Using the top 10 filter from the filter pain will automatically produce a  top10 from all months.  Rather than the current one.  It works fine when selecting one of the last 3 months from line chart, as that looks at month selected .  So its the initally display of values which is not working.  

I already have date table with True or false value for last month:- Called "iscurrentMonth"  plus I have the logic for working current month as it is used else where for other Calaculations

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors